提交merge1.3

This commit is contained in:
2025-12-27 15:31:06 +08:00
parent cbd3e7f981
commit 79ea4ed4f7
148 changed files with 6722 additions and 10861 deletions

View File

@@ -65,11 +65,11 @@ public class OutpatientChargeAppServiceImpl implements IOutpatientChargeAppServi
OutpatientInitDto initDto = new OutpatientInitDto();
List<OutpatientInitDto.chargeItemStatusOption> chargeItemStatusOptions = new ArrayList<>();
chargeItemStatusOptions.add(new OutpatientInitDto.chargeItemStatusOption(ChargeItemStatus.PLANNED.getValue(),
ChargeItemStatus.PLANNED.getInfo()));
ChargeItemStatus.PLANNED.getInfo()));
chargeItemStatusOptions.add(new OutpatientInitDto.chargeItemStatusOption(ChargeItemStatus.BILLABLE.getValue(),
ChargeItemStatus.BILLABLE.getInfo()));
ChargeItemStatus.BILLABLE.getInfo()));
chargeItemStatusOptions.add(new OutpatientInitDto.chargeItemStatusOption(ChargeItemStatus.BILLED.getValue(),
ChargeItemStatus.BILLED.getInfo()));
ChargeItemStatus.BILLED.getInfo()));
initDto.setChargeItemStatusOptions(chargeItemStatusOptions);
return R.ok(initDto);
}
@@ -86,17 +86,17 @@ public class OutpatientChargeAppServiceImpl implements IOutpatientChargeAppServi
*/
@Override
public R<?> getEncounterPatientPage(EncounterPatientPageParam encounterPatientPageParam, String searchKey,
Integer pageNo, Integer pageSize, HttpServletRequest request) {
Integer pageNo, Integer pageSize, HttpServletRequest request) {
// 构建查询条件
QueryWrapper<EncounterPatientPageParam> queryWrapper = HisQueryUtils.buildQueryWrapper(
encounterPatientPageParam, searchKey,
new HashSet<>(Arrays.asList(CommonConstants.FieldName.PatientWbStr, CommonConstants.FieldName.PatientPyStr,
CommonConstants.FieldName.PatientName, CommonConstants.FieldName.PatientBusNo,
CommonConstants.FieldName.EncounterBusNo, CommonConstants.FieldName.IdCard)),
request);
encounterPatientPageParam, searchKey,
new HashSet<>(Arrays.asList(CommonConstants.FieldName.PatientWbStr, CommonConstants.FieldName.PatientPyStr,
CommonConstants.FieldName.PatientName, CommonConstants.FieldName.PatientBusNo,
CommonConstants.FieldName.EncounterBusNo, CommonConstants.FieldName.IdCard)),
request);
// 就诊患者分页列表
Page<EncounterPatientPageDto> encounterPatientPage = outpatientChargeAppMapper
.selectEncounterPatientPage(new Page<>(pageNo, pageSize), queryWrapper, EncounterClass.AMB.getValue());
.selectEncounterPatientPage(new Page<>(pageNo, pageSize), queryWrapper, EncounterClass.AMB.getValue());
encounterPatientPage.getRecords().forEach(e -> {
// 性别枚举
@@ -117,13 +117,13 @@ public class OutpatientChargeAppServiceImpl implements IOutpatientChargeAppServi
*/
@Override
public List<EncounterPatientPrescriptionDto> getEncounterPatientPrescription(Long encounterId) {
List<EncounterPatientPrescriptionDto> prescriptionDtoList =
outpatientChargeAppMapper.selectEncounterPatientPrescription(encounterId,
ChargeItemContext.ACTIVITY.getValue(), ChargeItemContext.MEDICATION.getValue(),
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());
List<EncounterPatientPrescriptionDto> prescriptionDtoList
= outpatientChargeAppMapper.selectEncounterPatientPrescription(encounterId,
ChargeItemContext.ACTIVITY.getValue(), ChargeItemContext.MEDICATION.getValue(),
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());
prescriptionDtoList.forEach(e -> {
// 收费状态枚举
e.setStatusEnum_enumText(EnumUtils.getInfoByValue(ChargeItemStatus.class, e.getStatusEnum()));
@@ -142,7 +142,7 @@ public class OutpatientChargeAppServiceImpl implements IOutpatientChargeAppServi
// 获取就诊患者的自费账户id
Long accountId = accountService.getSelfPayAccount(encounterId);
if (accountId == null) {
return R.fail(MessageUtils.createMessage(PromptMsgConstant.Payment.M00008, new Object[] {"自费账户"}));
return R.fail(MessageUtils.createMessage(PromptMsgConstant.Payment.M00008, new Object[]{"自费账户"}));
}
// 医保转自费
boolean result = chargeItemService.updateAccountType(encounterId, accountId);
@@ -163,7 +163,7 @@ public class OutpatientChargeAppServiceImpl implements IOutpatientChargeAppServi
// 获取就诊患者的医保账户id
Long accountId = accountService.getMedicalInsuranceAccount(encounterId);
if (accountId == null) {
return R.fail(MessageUtils.createMessage(PromptMsgConstant.Payment.M00008, new Object[] {"医保账户"}));
return R.fail(MessageUtils.createMessage(PromptMsgConstant.Payment.M00008, new Object[]{"医保账户"}));
}
// 自费转医保
boolean result = chargeItemService.updateAccountType(encounterId, accountId);
@@ -184,7 +184,7 @@ public class OutpatientChargeAppServiceImpl implements IOutpatientChargeAppServi
// 获取就诊患者的学生自费账户id
Long accountId = accountService.getStudentSelfAccount(encounterId);
if (accountId == null) {
return R.fail(MessageUtils.createMessage(PromptMsgConstant.Payment.M00008, new Object[] {"医保账户"}));
return R.fail(MessageUtils.createMessage(PromptMsgConstant.Payment.M00008, new Object[]{"医保账户"}));
}
// 自费转医保
boolean result = chargeItemService.updateAccountType(encounterId, accountId);
@@ -205,7 +205,7 @@ public class OutpatientChargeAppServiceImpl implements IOutpatientChargeAppServi
// 获取就诊患者的学生医保账户id
Long accountId = accountService.getStudentYbAccount(encounterId);
if (accountId == null) {
return R.fail(MessageUtils.createMessage(PromptMsgConstant.Payment.M00008, new Object[] {"医保账户"}));
return R.fail(MessageUtils.createMessage(PromptMsgConstant.Payment.M00008, new Object[]{"医保账户"}));
}
// 自费转医保
boolean result = chargeItemService.updateAccountType(encounterId, accountId);
@@ -214,8 +214,6 @@ public class OutpatientChargeAppServiceImpl implements IOutpatientChargeAppServi
}
return R.ok(MessageUtils.createMessage(PromptMsgConstant.Common.M00004, null));
}
<<<<<<< HEAD
=======
/**
* 根据就诊id查询患者处方列表并新增字段应收金额实收金额优惠金额折扣率
@@ -226,14 +224,14 @@ public class OutpatientChargeAppServiceImpl implements IOutpatientChargeAppServi
@Override
public List<EncounterPatientPrescriptionDto> getEncounterPatientPrescriptionWithPrice(Long encounterId) {
List<EncounterPatientPrescriptionDto> prescriptionDtoList = outpatientChargeAppMapper
.selectEncounterPatientPrescriptionWithPrice(encounterId, ChargeItemContext.ACTIVITY.getValue(),
ChargeItemContext.MEDICATION.getValue(), 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(), 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());
.selectEncounterPatientPrescriptionWithPrice(encounterId, ChargeItemContext.ACTIVITY.getValue(),
ChargeItemContext.MEDICATION.getValue(), 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(), 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());
prescriptionDtoList.forEach(e -> {
// 应收金额
BigDecimal receivableAmount = e.getReceivableAmount();
@@ -242,7 +240,7 @@ public class OutpatientChargeAppServiceImpl implements IOutpatientChargeAppServi
// 计算折扣率
BigDecimal discountRate = BigDecimal.ONE;
if (receivableAmount.compareTo(BigDecimal.ZERO) > 0 && receivedAmount.compareTo(BigDecimal.ZERO) > 0
&& receivableAmount.compareTo(receivedAmount) > 0) {
&& receivableAmount.compareTo(receivedAmount) > 0) {
discountRate = receivedAmount.divide(receivableAmount, 2, RoundingMode.HALF_UP);
}
e.setDiscountRate(this.returnDiscountRate(discountRate));
@@ -254,10 +252,11 @@ public class OutpatientChargeAppServiceImpl implements IOutpatientChargeAppServi
/**
* 调整折扣率
*
*
* @param discountRate 折扣率
* @return 调整后的折扣率0.05的倍数)
**/
*
*/
private String returnDiscountRate(BigDecimal discountRate) {
BigDecimal compareValue = BigDecimal.valueOf(0.05);
BigDecimal remainder = discountRate.remainder(compareValue);
@@ -278,5 +277,4 @@ public class OutpatientChargeAppServiceImpl implements IOutpatientChargeAppServi
return df.format(reActuarial);
}
}
>>>>>>> v1.3
}

View File

@@ -16,7 +16,9 @@ import lombok.experimental.Accessors;
@Accessors(chain = true)
public class CurrentDayEncounterDto {
/** 租户ID */
/**
* 租户ID
*/
private Integer tenantId;
/**
@@ -134,43 +136,5 @@ public class CurrentDayEncounterDto {
* 电话
*/
private String phone;
<<<<<<< HEAD
/**
* 退号日期/时间
*/
private Date returnDate;
/**
* 退号原因
*/
private String returnReason;
/**
* 退号操作人
*/
private String operatorName;
/**
* 退号操作工号(用户账号)
*/
private String operatorId;
/**
* 退款金额
*/
private BigDecimal refundAmount;
/**
* 合同编码(费用性质代码)
*/
private String contractNo;
/**
* 退款方式(多个支付方式用逗号分隔)
*/
private String refundMethod;
=======
>>>>>>> v1.3
}

View File

@@ -23,142 +23,191 @@ import lombok.experimental.Accessors;
@Accessors(chain = true)
public class EncounterPatientPrescriptionDto {
/** 收费项目类型 */
/**
* 收费项目类型
*/
private Integer contextEnum;
private String contextEnum_enumText;
/** 收费状态 */
/**
* 收费状态
*/
private Integer statusEnum;
private String statusEnum_enumText;
/** 就诊ID */
/**
* 就诊ID
*/
@JsonSerialize(using = ToStringSerializer.class)
private Long encounterId;
/** 患者id */
/**
* 患者id
*/
@JsonSerialize(using = ToStringSerializer.class)
private Long patientId;
/** ID */
/**
* ID
*/
@JsonSerialize(using = ToStringSerializer.class)
private Long id;
/** 开立科室 */
/**
* 开立科室
*/
@JsonSerialize(using = ToStringSerializer.class)
private Long requestingOrgId;
/** 数量 */
/**
* 数量
*/
private Long quantityValue;
/** 单位 */
/**
* 单位
*/
@Dict(dictCode = "unit_code")
private String quantityUnit;
private String quantityUnit_dictText;
/** 单价 */
/**
* 单价
*/
private BigDecimal unitPrice;
/** 总价 */
/**
* 总价
*/
private BigDecimal totalPrice;
/** 处方号 */
/**
* 处方号
*/
private String prescriptionNo;
/** 业务编码 */
/**
* 业务编码
*/
private String busNo;
/** 收款人ID */
/**
* 收款人ID
*/
@JsonSerialize(using = ToStringSerializer.class)
@Dict(dictCode = "id", dictTable = "adm_practitioner", dictText = "name")
private Long entererId;
private String entererId_dictText;
/** 开立时间 */
/**
* 开立时间
*/
private Date enteredDate;
/** 收费时间 */
/**
* 收费时间
*/
private Date billDate;
/** 关联账户ID */
/**
* 关联账户ID
*/
@JsonSerialize(using = ToStringSerializer.class)
private Long accountId;
/** 物品编码 */
/**
* 物品编码
*/
@JsonSerialize(using = ToStringSerializer.class)
private Long itemId;
/** 物品名称 */
/**
* 物品名称
*/
private String itemName;
/** 特病标识 */
/**
* 特病标识
*/
@Dict(dictCode = "med_type")
private String medTypeCode;
private String medTypeCode_dictText;
<<<<<<< HEAD
=======
>>>>>>> v1.3
/** 用法 */
/**
* 用法
*/
@Dict(dictCode = "method_code")
private String methodCode;
private String methodCode_dictText;
<<<<<<< HEAD
private String dose;
@Dict(dictCode = "unit_code")
private String doseUnitCode;
/** 单次剂量单位 */
private String doseUnitCode_dictText;
/** 频次 */
private String rateCode;
=======
/** 剂量 */
/**
* 剂量
*/
private String dose;
/** 剂量单位 */
/**
* 剂量单位
*/
@Dict(dictCode = "unit_code")
private String doseUnitCode;
private String doseUnitCode_dictText;
/** 频次 */
/**
* 频次
*/
private String rateCode;
>>>>>>> v1.3
/** 合同编码 */
/**
* 合同编码
*/
private String contractNo;
/** 医保编码 */
/**
* 医保编码
*/
private String ybNo;
/** 合同名称 */
/**
* 合同名称
*/
private String contractName;
/** 服务所在表 */
/**
* 服务所在表
*/
private String serviceTable;
/** 服务所在表对应的id */
/**
* 服务所在表对应的id
*/
@JsonSerialize(using = ToStringSerializer.class)
private Long serviceId;
/** 付款id */
/**
* 付款id
*/
@JsonSerialize(using = ToStringSerializer.class)
private Long paymentId;
<<<<<<< HEAD
=======
/** 实收金额 */
/**
* 实收金额
*/
private BigDecimal receivedAmount = BigDecimal.ZERO;
/** 优惠金额 */
/**
* 优惠金额
*/
private BigDecimal discountAmount = BigDecimal.ZERO;
/** 应收金额 */
/**
* 应收金额
*/
private BigDecimal receivableAmount = BigDecimal.ZERO;
/** 折扣率 */
/**
* 折扣率
*/
@Dict(dictCode = "charge_discount")
private String discountRate = "0";
private String discountRate_dictText;
>>>>>>> v1.3
}