843 【门诊收费-收费项目】待收费患者的收费明细列表混入“已收费”项目,且错误计入合计金额

This commit is contained in:
wangjian963
2026-06-26 16:59:54 +08:00
parent 659ccab18b
commit 12d53eb6b8
7 changed files with 38 additions and 20 deletions

View File

@@ -35,9 +35,10 @@ public interface IOutpatientChargeAppService {
* 根据就诊id查询患者处方列表 * 根据就诊id查询患者处方列表
* *
* @param encounterId 就诊id * @param encounterId 就诊id
* @param statusEnum 收费状态过滤(可选,不传则返回全部状态)
* @return 患者处方列表 * @return 患者处方列表
*/ */
List<EncounterPatientPrescriptionDto> getEncounterPatientPrescription(Long encounterId); List<EncounterPatientPrescriptionDto> getEncounterPatientPrescription(Long encounterId, Integer statusEnum);
/** /**
* 根据就诊id查询患者处方列表并新增字段实收金额、应收金额、优惠金额、折扣率 * 根据就诊id查询患者处方列表并新增字段实收金额、应收金额、优惠金额、折扣率

View File

@@ -111,10 +111,11 @@ public class OutpatientChargeAppServiceImpl implements IOutpatientChargeAppServi
* 根据就诊id查询患者处方列表 * 根据就诊id查询患者处方列表
* *
* @param encounterId 就诊id * @param encounterId 就诊id
* @param statusEnum 收费状态过滤(可选,不传则返回全部状态)
* @return 患者处方列表 * @return 患者处方列表
*/ */
@Override @Override
public List<EncounterPatientPrescriptionDto> getEncounterPatientPrescription(Long encounterId) { public List<EncounterPatientPrescriptionDto> getEncounterPatientPrescription(Long encounterId, Integer statusEnum) {
List<EncounterPatientPrescriptionDto> prescriptionDtoList List<EncounterPatientPrescriptionDto> prescriptionDtoList
= outpatientChargeAppMapper.selectEncounterPatientPrescription(encounterId, = outpatientChargeAppMapper.selectEncounterPatientPrescription(encounterId,
ChargeItemContext.ACTIVITY.getValue(), ChargeItemContext.MEDICATION.getValue(), ChargeItemContext.ACTIVITY.getValue(), ChargeItemContext.MEDICATION.getValue(),
@@ -123,7 +124,7 @@ public class OutpatientChargeAppServiceImpl implements IOutpatientChargeAppServi
ChargeItemStatus.PLANNED.getValue(), ChargeItemStatus.BILLABLE.getValue(), ChargeItemStatus.PLANNED.getValue(), ChargeItemStatus.BILLABLE.getValue(),
ChargeItemStatus.BILLED.getValue(), ChargeItemStatus.REFUNDING.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); CommonConstants.TableName.WOR_DEVICE_REQUEST, statusEnum);
prescriptionDtoList.forEach(e -> { prescriptionDtoList.forEach(e -> {
// 收费状态枚举 // 收费状态枚举
e.setStatusEnum_enumText(EnumUtils.getInfoByValue(ChargeItemStatus.class, e.getStatusEnum())); e.setStatusEnum_enumText(EnumUtils.getInfoByValue(ChargeItemStatus.class, e.getStatusEnum()));

View File

@@ -61,11 +61,13 @@ public class OutpatientChargeController {
* 根据就诊id查询患者处方列表 * 根据就诊id查询患者处方列表
* *
* @param encounterId 就诊id * @param encounterId 就诊id
* @param statusEnum 收费状态过滤(可选,不传则返回全部状态)
* @return 患者处方列表 * @return 患者处方列表
*/ */
@GetMapping(value = "/patient-prescription") @GetMapping(value = "/patient-prescription")
public R<?> getEncounterPatientPrescription(@RequestParam Long encounterId) { public R<?> getEncounterPatientPrescription(@RequestParam Long encounterId,
return R.ok(outpatientChargeAppService.getEncounterPatientPrescription(encounterId)); @RequestParam(required = false) Integer statusEnum) {
return R.ok(outpatientChargeAppService.getEncounterPatientPrescription(encounterId, statusEnum));
} }
/** /**

View File

@@ -59,7 +59,8 @@ public interface OutpatientChargeAppMapper {
@Param("chinesePatentMedicine") Integer chinesePatentMedicine, @Param("chinesePatentMedicine") Integer chinesePatentMedicine,
@Param("planned") Integer planned, @Param("billable") Integer billable, @Param("planned") Integer planned, @Param("billable") Integer billable,
@Param("billed") Integer billed, @Param("refunding") Integer refunding, @Param("refunded") Integer refunded, @Param("billed") Integer billed, @Param("refunding") Integer refunding, @Param("refunded") Integer refunded,
@Param("partRefund") Integer partRefund, @Param("worDeviceRequest") String worDeviceRequest); @Param("partRefund") Integer partRefund, @Param("worDeviceRequest") String worDeviceRequest,
@Param("filterStatus") Integer filterStatus);
/** /**
* 根据就诊id查询患者处方列表并新增字段应收金额实收金额优惠金额折扣率 * 根据就诊id查询患者处方列表并新增字段应收金额实收金额优惠金额折扣率

View File

@@ -173,13 +173,20 @@
AND T9sr.delete_flag = '0' AND T9sr.delete_flag = '0'
LEFT JOIN wor_service_request AS wsrp ON wsrp.id = wsr.parent_id AND wsrp.delete_flag = '0' LEFT JOIN wor_service_request AS wsrp ON wsrp.id = wsr.parent_id AND wsrp.delete_flag = '0'
WHERE T1.encounter_id = #{encounterId} WHERE T1.encounter_id = #{encounterId}
AND T1.status_enum IN (0 <choose>
, #{planned} <when test="filterStatus != null">
, #{billable} AND T1.status_enum = #{filterStatus}
, #{billed} </when>
, #{refunding} <otherwise>
, #{refunded} AND T1.status_enum IN (0
, #{partRefund}) , #{planned}
, #{billable}
, #{billed}
, #{refunding}
, #{refunded}
, #{partRefund})
</otherwise>
</choose>
AND T1.context_enum != #{register} AND T1.context_enum != #{register}
AND ( AND (
-- 若能关联到请求表,则必须是“已签发”后才允许收费端展示 -- 若能关联到请求表,则必须是“已签发”后才允许收费端展示

View File

@@ -14,9 +14,13 @@ export function getList(queryParams) {
/** /**
* 患者处方列表 * 患者处方列表
*/ */
export function getChargeList(encounterId, config = {}) { export function getChargeList(encounterId, statusEnum, config = {}) {
let url = '/charge-manage/charge/patient-prescription?encounterId=' + encounterId
if (statusEnum !== undefined && statusEnum !== null) {
url += '&statusEnum=' + statusEnum
}
return request({ return request({
url: '/charge-manage/charge/patient-prescription?encounterId=' + encounterId, url: url,
method: 'get', method: 'get',
...config ...config
}) })

View File

@@ -466,9 +466,11 @@ function handleSelectionChange(selection) {
} }
function handleTotalAmount() { function handleTotalAmount() {
if (selectedRows.value.length == 0) { if (selectedRows.value.length == 0) {
totalAmounts.value = chargeList.value.reduce((accumulator, currentRow) => { totalAmounts.value = chargeList.value
return new Decimal(accumulator).add(currentRow.totalPrice.toFixed(2) || 0); .filter((row) => row.statusEnum === 1)
}, new Decimal(0)); .reduce((accumulator, currentRow) => {
return new Decimal(accumulator).add(currentRow.totalPrice.toFixed(2) || 0);
}, new Decimal(0));
} else { } else {
totalAmounts.value = selectedRows.value.reduce((accumulator, currentRow) => { totalAmounts.value = selectedRows.value.reduce((accumulator, currentRow) => {
return new Decimal(accumulator).add(currentRow.totalPrice.toFixed(2) || 0); return new Decimal(accumulator).add(currentRow.totalPrice.toFixed(2) || 0);
@@ -530,7 +532,7 @@ function clickRow(params) {
patientInfo.value = { ...row, encounterId: encId }; patientInfo.value = { ...row, encounterId: encId };
chargeLoading.value = true; chargeLoading.value = true;
encounterId.value = encId; encounterId.value = encId;
getChargeList(encId).then((res) => { getChargeList(encId, queryParams.value.statusEnum).then((res) => {
chargeList.value = res.data; chargeList.value = res.data;
setTimeout(() => { setTimeout(() => {
chargeLoading.value = false; chargeLoading.value = false;
@@ -544,7 +546,7 @@ function handleClose(value, msg) {
if (value == 'success') { if (value == 'success') {
proxy.$modal.msgSuccess(msg); proxy.$modal.msgSuccess(msg);
chargeLoading.value = true; chargeLoading.value = true;
getChargeList(patientInfo.value.encounterId, { skipErrorMsg: true }).then((res) => { getChargeList(patientInfo.value.encounterId, queryParams.value.statusEnum, { skipErrorMsg: true }).then((res) => {
chargeList.value = res.data; chargeList.value = res.data;
setTimeout(() => { setTimeout(() => {
chargeLoading.value = false; chargeLoading.value = false;