版本更新
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
package com.openhis.web.paymentmanage.appservice;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import com.openhis.web.paymentmanage.dto.ChargeSummaryDto;
|
||||
|
||||
public interface IChargeBillService {
|
||||
/**
|
||||
*
|
||||
* @param paymentId
|
||||
* @return
|
||||
*/
|
||||
Map getDetail(Long paymentId);
|
||||
|
||||
/**
|
||||
*
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
Map getTotal(String startTime, String endTime, Long entererId, String contractNo);
|
||||
|
||||
Map getTotalCcu(String startTime, String endTime, Long entererId);
|
||||
|
||||
Map getTotalCommen(String startTime, String endTime, Long entererId);
|
||||
|
||||
/**
|
||||
*
|
||||
* @param paymentId
|
||||
* @return
|
||||
*/
|
||||
Map getMedicalExpenseCoverageSummary(Long paymentId);
|
||||
|
||||
/**
|
||||
*
|
||||
* @param chargeSummaryDto
|
||||
* @return
|
||||
*/
|
||||
Map getChargeItemByOrg(ChargeSummaryDto chargeSummaryDto);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.web.paymentmanage.appservice;
|
||||
|
||||
import com.core.common.core.domain.R;
|
||||
import com.openhis.administration.domain.Invoice;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
/**
|
||||
* 电子发票接口Service
|
||||
*
|
||||
* @author yuxj
|
||||
* @date 2025-04-22
|
||||
*/
|
||||
public interface IEleInvoiceService {
|
||||
|
||||
/**
|
||||
* 电子票据补开接口
|
||||
*
|
||||
* @param paymentId 支付ID
|
||||
* @param encounterId 就诊ID
|
||||
* @return
|
||||
*/
|
||||
R<?> invoiceReissue(Long paymentId, Long encounterId);
|
||||
|
||||
/**
|
||||
* 医疗挂号电子票据开具接口
|
||||
*
|
||||
* @param paymentId 支付ID
|
||||
* @param encounterId 就诊ID
|
||||
* @return
|
||||
*/
|
||||
R<?> invoiceRegMake(Long paymentId, Long encounterId);
|
||||
|
||||
/**
|
||||
* 医疗门诊电子票据开具接口
|
||||
*
|
||||
* @param paymentId 支付ID
|
||||
* @param encounterId 就诊ID
|
||||
* @return
|
||||
*/
|
||||
R<?> invoiceMZMake(Long paymentId, Long encounterId);
|
||||
|
||||
/**
|
||||
* 医疗住院电子票据开具接口
|
||||
*
|
||||
* @param paymentId 支付ID
|
||||
* @param encounterId 就诊ID
|
||||
* @return
|
||||
*/
|
||||
R<?> invoiceZYMake(Long paymentId, Long encounterId);
|
||||
|
||||
/**
|
||||
* 医疗电子票据红冲接口
|
||||
*
|
||||
* @param paymentId 原付款id
|
||||
* @param reason 取消理由
|
||||
* @return
|
||||
*/
|
||||
R<?> invoiceWriteoff(Long paymentId, String reason);
|
||||
|
||||
/**
|
||||
* 查询已开发票
|
||||
* @param invoiceId 主键id
|
||||
* @return
|
||||
*/
|
||||
Invoice getInvoiceById(Long invoiceId);
|
||||
}
|
||||
@@ -0,0 +1,129 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.web.paymentmanage.appservice;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.core.common.core.domain.R;
|
||||
import com.openhis.web.chargemanage.dto.OutpatientRegistrationAddParam;
|
||||
import com.openhis.web.chargemanage.dto.OutpatientRegistrationSettleParam;
|
||||
import com.openhis.web.paymentmanage.dto.CancelPaymentDto;
|
||||
import com.openhis.web.paymentmanage.dto.InpatientPreSettleResultDto;
|
||||
import com.openhis.web.paymentmanage.dto.PaymentVO;
|
||||
import com.openhis.yb.dto.PaymentDetailDto;
|
||||
import com.openhis.yb.dto.PaymentDto;
|
||||
import com.openhis.yb.dto.PaymentInpatientDto;
|
||||
import com.openhis.yb.dto.PrePaymentDto;
|
||||
|
||||
/**
|
||||
* 付款应用层Service
|
||||
*
|
||||
* @author SunJQ
|
||||
* @date 2025-03-29
|
||||
*/
|
||||
public interface IPaymentRecService {
|
||||
/**
|
||||
* 付款
|
||||
*
|
||||
* @param paymentDto 入参
|
||||
* @return 结果
|
||||
*/
|
||||
R<?> savePayment(PaymentDto paymentDto);
|
||||
|
||||
/**
|
||||
* 取消付款
|
||||
*
|
||||
* @param cancelPaymentDto 入参
|
||||
* @return 结果
|
||||
*/
|
||||
R<?> cancelPayment(CancelPaymentDto cancelPaymentDto);
|
||||
|
||||
/**
|
||||
* 取消付款
|
||||
*
|
||||
* @param cancelPaymentDto 入参
|
||||
* @return 结果
|
||||
*/
|
||||
R<?> cancelRegPayment(CancelPaymentDto cancelPaymentDto);
|
||||
|
||||
/**
|
||||
* 支付列表
|
||||
*
|
||||
* @param searchKey 查询条件
|
||||
* @param pageNo 分页参数
|
||||
* @param pageSize 分页参数
|
||||
* @param request 请求参数
|
||||
* @return 结果
|
||||
*/
|
||||
IPage<PaymentVO> getPage(String searchKey, Integer kingEnum, Integer pageNo, Integer pageSize,
|
||||
HttpServletRequest request);
|
||||
|
||||
/**
|
||||
* 获取支付详情
|
||||
*
|
||||
* @param paymentDto 入参
|
||||
* @return 结果
|
||||
*/
|
||||
List<PaymentDetailDto> getDetail(PaymentDto paymentDto);
|
||||
|
||||
/**
|
||||
* 预结算
|
||||
*
|
||||
* @param prePaymentDto 预结算入参
|
||||
* @return 预结算结果
|
||||
*/
|
||||
R<?> prePayment(PrePaymentDto prePaymentDto);
|
||||
|
||||
/**
|
||||
* 挂号预结算
|
||||
*
|
||||
* @param outpatientRegistrationAddParam 挂号参数
|
||||
* @return 预结算结果
|
||||
*/
|
||||
R<?> regPrePay(OutpatientRegistrationAddParam outpatientRegistrationAddParam);
|
||||
|
||||
/**
|
||||
* 挂号结算
|
||||
*
|
||||
* @param outpatientRegistrationSettleParam 挂号参数
|
||||
* @return 预结算结果
|
||||
*/
|
||||
R<?> regPay(OutpatientRegistrationSettleParam outpatientRegistrationSettleParam, String chrgBchno,
|
||||
List<PaymentDetailDto> paymentDetails);
|
||||
|
||||
/**
|
||||
* 取消预结算
|
||||
*
|
||||
* @param encounterId 就诊id
|
||||
* @return 操作结果
|
||||
*/
|
||||
R<?> unPrePayment(Long encounterId);
|
||||
|
||||
/**
|
||||
* 住院预结算
|
||||
*
|
||||
* @param prePaymentDto 预结算参数
|
||||
* @return 预结算结果
|
||||
*/
|
||||
InpatientPreSettleResultDto inpatientPreSettle(PrePaymentDto prePaymentDto);
|
||||
|
||||
/**
|
||||
* 住院结算
|
||||
*
|
||||
* @param paymentDto 住院结算参数
|
||||
* @return 操作结果
|
||||
*/
|
||||
R<?> inpatientSettle(PaymentInpatientDto paymentDto);
|
||||
|
||||
/**
|
||||
* 【取消住院结算】
|
||||
*
|
||||
* @param paymentId 付款id
|
||||
* @return 操作结果
|
||||
*/
|
||||
R<?> inpatientUnPay(Long paymentId);
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,82 @@
|
||||
package com.openhis.web.paymentmanage.controller;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import com.core.common.annotation.Anonymous;
|
||||
import com.core.common.core.domain.R;
|
||||
import com.openhis.web.paymentmanage.appservice.IChargeBillService;
|
||||
import com.openhis.web.paymentmanage.dto.ChargeSummaryDto;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
* 报表
|
||||
*
|
||||
* @author SunJQ
|
||||
* @date 2025-03-29
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/payment/bill")
|
||||
@Slf4j
|
||||
public class ChargeBillController {
|
||||
|
||||
@Autowired
|
||||
private IChargeBillService iChargeBillService;
|
||||
|
||||
/**
|
||||
* 单次结算账单
|
||||
*
|
||||
* @param paymentId 付款实体
|
||||
*/
|
||||
@PostMapping("/getDetail")
|
||||
public R<?> getDetail(Long paymentId) {
|
||||
return R.ok(iChargeBillService.getDetail(paymentId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 日结算账单
|
||||
*
|
||||
* @param startTime 结算参数
|
||||
* @param endTime 结算参数
|
||||
* @param entererId 结算参数
|
||||
*/
|
||||
@GetMapping("/getTotal")
|
||||
public R<?> getTotal(@RequestParam("startTime") String startTime, @RequestParam("endTime") String endTime,
|
||||
@RequestParam("entererId") Long entererId,
|
||||
@RequestParam(value = "contractNo", required = false) String contractNo) {
|
||||
return R.ok(iChargeBillService.getTotal(startTime, endTime, entererId, contractNo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 日结算账单(长大版本)
|
||||
*
|
||||
* @param startTime 结算参数
|
||||
* @param endTime 结算参数
|
||||
* @param entererId 结算参数
|
||||
*/
|
||||
@GetMapping("/getTotalCcu")
|
||||
@Anonymous
|
||||
public R<?> getTotalCcu(@RequestParam(value = "startTime") String startTime,
|
||||
@RequestParam("endTime") String endTime, @RequestParam(value = "entererId", required = false) Long entererId) {
|
||||
return R.ok(iChargeBillService.getTotalCommen(startTime, endTime, entererId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取医疗保障金清单(门诊慢病用)
|
||||
*/
|
||||
@PostMapping("/get-med-exp-cov-sum")
|
||||
public R<?> getMedicalExpenseCoverageSummary(Long paymentId) {
|
||||
return R.ok(iChargeBillService.getMedicalExpenseCoverageSummary(paymentId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取各科室营收信息
|
||||
*/
|
||||
@PostMapping("/charge-summary")
|
||||
public R<?> getChargeSummary(@RequestBody ChargeSummaryDto chargeSummaryDto) {
|
||||
return R.ok(iChargeBillService.getChargeItemByOrg(chargeSummaryDto));
|
||||
// return null;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
package com.openhis.web.paymentmanage.controller;
|
||||
|
||||
import com.core.common.core.domain.R;
|
||||
import com.core.common.exception.ServiceException;
|
||||
import com.openhis.administration.domain.Invoice;
|
||||
import com.openhis.common.enums.ybenums.YbEncounterClass;
|
||||
import com.openhis.financial.domain.PaymentReconciliation;
|
||||
import com.openhis.web.paymentmanage.appservice.IChargeBillService;
|
||||
import com.openhis.web.paymentmanage.appservice.IEleInvoiceService;
|
||||
import com.openhis.web.paymentmanage.dto.InvoiceWriteOffDto;
|
||||
import com.openhis.web.paymentmanage.dto.MakeInvoiceDto;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 电子发票
|
||||
*
|
||||
* @author yuxj
|
||||
* @date 2025-05-28
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/invoice")
|
||||
@Slf4j
|
||||
public class EleInvoiceController {
|
||||
|
||||
@Autowired
|
||||
private IEleInvoiceService eleInvoiceService;
|
||||
|
||||
@Autowired
|
||||
private IChargeBillService iChargeBillService;
|
||||
|
||||
/**
|
||||
* 电子票据补开接口
|
||||
*
|
||||
* @param makeInvoiceDto 发票开具dto
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/invoiceReissue")
|
||||
public R<?> invoiceReissue(@RequestBody MakeInvoiceDto makeInvoiceDto) {
|
||||
// 付款成功后,开具发票
|
||||
R<?> result = eleInvoiceService.invoiceReissue(makeInvoiceDto.getPaymentId(), makeInvoiceDto.getEncounterId());
|
||||
if (result.getCode() == 200) {
|
||||
if (result.getData() == YbEncounterClass.REG.getValue()) {
|
||||
// 付款成功后,开具发票
|
||||
R<?> eleResult = eleInvoiceService.invoiceRegMake(makeInvoiceDto.getPaymentId(), makeInvoiceDto.getEncounterId());
|
||||
if (eleResult.getCode() != 200) {
|
||||
return R.ok(" 挂号电子发票开具失败 :" + eleResult.getMsg());
|
||||
}
|
||||
} else if (result.getData() == YbEncounterClass.AMB.getValue()) {
|
||||
// 付款成功后,开具发票
|
||||
R<?> eleResult = eleInvoiceService.invoiceMZMake(makeInvoiceDto.getPaymentId(), makeInvoiceDto.getEncounterId());
|
||||
if (eleResult.getCode() != 200) {
|
||||
return R.ok(" 门诊电子发票开具失败 :" + eleResult.getMsg());
|
||||
}
|
||||
} else if (result.getData() == YbEncounterClass.IMP.getValue()) {
|
||||
// 付款成功后,开具发票
|
||||
R<?> eleResult = eleInvoiceService.invoiceZYMake(makeInvoiceDto.getPaymentId(), makeInvoiceDto.getEncounterId());
|
||||
if (eleResult.getCode() != 200) {
|
||||
return R.ok(" 住院电子发票开具失败 :" + eleResult.getMsg());
|
||||
}
|
||||
} else {
|
||||
return R.ok("电子发票类型不明确!");
|
||||
}
|
||||
}
|
||||
Map detail = iChargeBillService.getDetail(makeInvoiceDto.getPaymentId());
|
||||
return R.ok(detail);
|
||||
}
|
||||
|
||||
/**
|
||||
* 医疗电子票据红冲接口
|
||||
*
|
||||
* @param invoiceWriteOffDto 原付款id
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/invoiceWriteoff")
|
||||
public R<?> invoiceWriteoff(@RequestBody InvoiceWriteOffDto invoiceWriteOffDto) {
|
||||
// 退款成功后,开具发票
|
||||
R<?> eleResult = eleInvoiceService.invoiceWriteoff(Long.parseLong(invoiceWriteOffDto.getPaymentId()), invoiceWriteOffDto.getReason());
|
||||
if (eleResult.getCode() != 200) {
|
||||
return R.ok(" 电子票据红冲失败 :" + eleResult.getMsg());
|
||||
}
|
||||
Map detail = iChargeBillService.getDetail(Long.parseLong(invoiceWriteOffDto.getPaymentId()));
|
||||
return R.ok(detail);
|
||||
}
|
||||
|
||||
/**
|
||||
* 医疗电子票据红冲接口
|
||||
*
|
||||
* @param invoiceId 原付款id
|
||||
* @return
|
||||
*/
|
||||
@PutMapping("/invoiceOpen")
|
||||
public R<?> invoiceOpen(@RequestParam("invoiceId") String invoiceId) {
|
||||
// 退款成功后,开具发票
|
||||
Invoice invoice = eleInvoiceService.getInvoiceById(Long.parseLong(invoiceId));
|
||||
if(invoice ==null){
|
||||
throw new ServiceException("未查询到发票信息");
|
||||
}
|
||||
return R.ok(invoice.getPictureUrl());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.web.paymentmanage.controller;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.core.common.core.domain.R;
|
||||
import com.openhis.financial.domain.Contract;
|
||||
import com.openhis.financial.service.IContractService;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
* 付款合同管理
|
||||
*
|
||||
* @author SunJQ
|
||||
* @date 2025-06-23
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/payment/contract")
|
||||
@Slf4j
|
||||
@AllArgsConstructor
|
||||
public class PaymentContractController {
|
||||
|
||||
@Autowired
|
||||
private IContractService contractService;
|
||||
|
||||
/**
|
||||
* 查询租户合同信息分页
|
||||
*
|
||||
* @param tenantId 租户ID
|
||||
* @param pageNum 当前页
|
||||
* @param pageSize 每页条数
|
||||
* @return 租户合同信息分页
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:tenant:operate')")
|
||||
@GetMapping("/page")
|
||||
public R<IPage<Contract>> getTenantContractPage(@RequestParam Integer tenantId,
|
||||
@RequestParam(defaultValue = "1") Integer pageNum, @RequestParam(defaultValue = "10") Integer pageSize) {
|
||||
return R.ok(contractService.getTenantContractPage(tenantId, pageNum, pageSize));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询租户合同信息详情
|
||||
*
|
||||
* @param id 合同ID
|
||||
* @return 租户合同信息详情
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:tenant:operate')")
|
||||
@GetMapping("/{id}")
|
||||
public R<Contract> getTenantContractDetail(@PathVariable Long id) {
|
||||
return R.ok(contractService.getTenantContractDetail(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增租户合同信息
|
||||
*
|
||||
* @param contract 合同管理实体
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:tenant:operate')")
|
||||
@PostMapping
|
||||
public R<?> addTenantContract(@RequestBody Contract contract) {
|
||||
contractService.addTenantContract(contract);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑租户合同信息
|
||||
*
|
||||
* @param contract 合同管理实体
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:tenant:operate')")
|
||||
@PutMapping
|
||||
public R<?> editTenantContract(@RequestBody Contract contract) {
|
||||
contractService.editTenantContract(contract);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除租户合同信息
|
||||
*
|
||||
* @param id ID
|
||||
* @return 结果
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:tenant:operate')")
|
||||
@DeleteMapping("/{id}")
|
||||
public R<?> delTenantContract(@PathVariable Long id) {
|
||||
contractService.delTenantContract(id);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,253 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.web.paymentmanage.controller;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.validation.Valid;
|
||||
|
||||
import com.openhis.web.paymentmanage.dto.CancelPaymentInpatientDto;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import com.core.common.core.domain.R;
|
||||
import com.openhis.financial.domain.PaymentReconciliation;
|
||||
import com.openhis.web.chargemanage.dto.OutpatientRegistrationAddParam;
|
||||
import com.openhis.web.chargemanage.dto.OutpatientRegistrationSettleParam;
|
||||
import com.openhis.web.paymentmanage.appservice.IChargeBillService;
|
||||
import com.openhis.web.paymentmanage.appservice.IEleInvoiceService;
|
||||
import com.openhis.web.paymentmanage.appservice.IPaymentRecService;
|
||||
import com.openhis.web.paymentmanage.dto.CancelPaymentDto;
|
||||
import com.openhis.yb.dto.PaymentDto;
|
||||
import com.openhis.yb.dto.PaymentInpatientDto;
|
||||
import com.openhis.yb.dto.PrePaymentDto;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
* 付款管理
|
||||
*
|
||||
* @author SunJQ
|
||||
* @date 2025-03-29
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/payment/payment")
|
||||
@Slf4j
|
||||
@AllArgsConstructor
|
||||
public class PaymentReconciliationController {
|
||||
|
||||
@Autowired
|
||||
private IPaymentRecService paymentReconciliationService;
|
||||
|
||||
@Autowired
|
||||
private IEleInvoiceService eleInvoiceService;
|
||||
|
||||
@Autowired
|
||||
private IChargeBillService iChargeBillService;
|
||||
|
||||
/**
|
||||
* 预付款
|
||||
*
|
||||
* @param prePaymentDto 付款实体
|
||||
*/
|
||||
@PostMapping("/precharge")
|
||||
public R<?> savePrePayment(@Validated @RequestBody PrePaymentDto prePaymentDto) {
|
||||
return paymentReconciliationService.prePayment(prePaymentDto);
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消预付款(该接口未被调用)
|
||||
*
|
||||
* @param encounterId 就诊id
|
||||
* @return 操作结果
|
||||
*/
|
||||
@PostMapping("/unprecharge")
|
||||
public R<?> unPrePayment(Long encounterId) {
|
||||
return paymentReconciliationService.unPrePayment(encounterId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 付款
|
||||
*
|
||||
* @param paymentDto 付款实体
|
||||
*/
|
||||
@PostMapping("/charge")
|
||||
public R<?> savePayment(@Validated @RequestBody PaymentDto paymentDto) {
|
||||
R<?> result = paymentReconciliationService.savePayment(paymentDto);
|
||||
// 付款成功后,开具发票
|
||||
if (result.getCode() == 200) {
|
||||
PaymentReconciliation paymentRecon = null;
|
||||
if (PaymentReconciliation.class.isAssignableFrom(result.getData().getClass())) {
|
||||
paymentRecon = (PaymentReconciliation)result.getData();
|
||||
}
|
||||
R<?> eleResult = eleInvoiceService.invoiceMZMake(paymentRecon.getId(), paymentDto.getEncounterId());
|
||||
Map detail = iChargeBillService.getDetail(paymentRecon.getId());
|
||||
if (eleResult.getCode() != 200) {
|
||||
// 因收费成功前端需要关闭弹窗,此处信息仅用于提示所以返回ok
|
||||
return R.ok(detail, " 收费成功,电子发票开具失败 :" + eleResult.getMsg());
|
||||
}
|
||||
// Map detail = iChargeBillService.getDetail(paymentRecon.getId());
|
||||
return R.ok(detail);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消付款
|
||||
*
|
||||
* @param cancelPaymentDto 付款实体
|
||||
*/
|
||||
@PostMapping("/uncharge")
|
||||
public R<?> cancelPayment(@RequestBody CancelPaymentDto cancelPaymentDto) {
|
||||
R<?> result = paymentReconciliationService.cancelPayment(cancelPaymentDto);
|
||||
// 取消付款成功后,开具发票
|
||||
if (result.getCode() == 200) {
|
||||
PaymentReconciliation paymentRecon = null;
|
||||
if (PaymentReconciliation.class.isAssignableFrom(result.getData().getClass())) {
|
||||
paymentRecon = (PaymentReconciliation)result.getData();
|
||||
}
|
||||
R<?> eleResult =
|
||||
eleInvoiceService.invoiceWriteoff(paymentRecon.getRelationId(), cancelPaymentDto.getReason());
|
||||
if (eleResult.getCode() != 200) {
|
||||
// 因取消付款成功前端需要关闭弹窗,此处信息仅用于提示所以返回ok
|
||||
return R.ok(null, " 取消付款成功,电子发票开具失败 :" + eleResult.getMsg());
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 支付列表
|
||||
*
|
||||
* @param searchKey 模糊查寻
|
||||
* @param pageNo 页号
|
||||
* @param pageSize 页容量
|
||||
* @param request 请求体
|
||||
* @return 查询结果
|
||||
*/
|
||||
@GetMapping("/page")
|
||||
public R<?> paymentPage(@RequestParam(value = "searchKey", defaultValue = "") String searchKey,
|
||||
@RequestParam(value = "kinsEnum", defaultValue = "") Integer kinsEnum,
|
||||
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest request) {
|
||||
return R.ok(paymentReconciliationService.getPage(searchKey, kinsEnum, pageNo, pageSize, request));
|
||||
}
|
||||
|
||||
/**
|
||||
* 支付详情
|
||||
*
|
||||
* @param paymentDto 付款信息
|
||||
* @return 查询结果
|
||||
*/
|
||||
@PostMapping("/detail")
|
||||
public R<?> paymentDetail(@RequestBody PaymentDto paymentDto) {
|
||||
return R.ok(paymentReconciliationService.getDetail(paymentDto));
|
||||
}
|
||||
|
||||
/**
|
||||
* 挂号收费(挂号收费先医保挂号,收费成功后再本系统挂号)
|
||||
*
|
||||
* @param outpatientRegistrationAddParam 挂号信息
|
||||
* @return 操做结果
|
||||
*/
|
||||
@PostMapping("/reg-pre-pay")
|
||||
public R<?> regPrePay(@Valid @RequestBody OutpatientRegistrationAddParam outpatientRegistrationAddParam) {
|
||||
return paymentReconciliationService.regPrePay(outpatientRegistrationAddParam);
|
||||
}
|
||||
|
||||
/**
|
||||
* 挂号收费(挂号收费先医保挂号,收费成功后再本系统挂号)
|
||||
*
|
||||
* @param outpatientRegistrationAddParam 挂号信息
|
||||
* @return 操做结果
|
||||
*/
|
||||
@PostMapping("/reg-pay")
|
||||
public R<?> regPay(@Valid @RequestBody OutpatientRegistrationSettleParam outpatientRegistrationAddParam) {
|
||||
R<?> result = paymentReconciliationService.regPay(outpatientRegistrationAddParam,
|
||||
outpatientRegistrationAddParam.getChrgBchno(), outpatientRegistrationAddParam.getPaymentDetails());
|
||||
// 付款成功后,开具发票
|
||||
if (result.getCode() == 200) {
|
||||
PaymentReconciliation paymentRecon = null;
|
||||
if (PaymentReconciliation.class.isAssignableFrom(result.getData().getClass())) {
|
||||
paymentRecon = (PaymentReconciliation)result.getData();
|
||||
}
|
||||
Long encounterId = paymentRecon.getEncounterId();
|
||||
R<?> eleResult = eleInvoiceService.invoiceRegMake(paymentRecon.getId(), encounterId);
|
||||
Map detail = iChargeBillService.getDetail(paymentRecon.getId());
|
||||
if (eleResult.getCode() != 200) {
|
||||
// 因收费成功前端需要关闭弹窗,此处信息仅用于提示所以返回ok
|
||||
return R.ok(detail, " 收费成功,电子发票开具失败 :" + eleResult.getMsg());
|
||||
}
|
||||
return R.ok(detail);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 【住院预结算】
|
||||
*
|
||||
* @param prePaymentDto 预结算参数
|
||||
* @return 操作结果
|
||||
*/
|
||||
@PostMapping("/inpa-pre-pay")
|
||||
|
||||
public R<?> inpatientPrePay(@RequestBody PrePaymentDto prePaymentDto) {
|
||||
return R.ok(paymentReconciliationService.inpatientPreSettle(prePaymentDto));
|
||||
}
|
||||
|
||||
/**
|
||||
* 【住院结算】
|
||||
*
|
||||
* @param paymentDto 预结算参数
|
||||
* @return 操作结果
|
||||
*/
|
||||
@PostMapping("/inpa-pay")
|
||||
public R<?> inpatientPay(@RequestBody PaymentInpatientDto paymentDto) {
|
||||
R<?> r = paymentReconciliationService.inpatientSettle(paymentDto);
|
||||
// 付款成功后,开具发票
|
||||
if (r.getCode() == 200) {
|
||||
PaymentReconciliation paymentRecon = null;
|
||||
if (PaymentReconciliation.class.isAssignableFrom(r.getData().getClass())) {
|
||||
paymentRecon = (PaymentReconciliation)r.getData();
|
||||
}
|
||||
Long encounterId = paymentRecon.getEncounterId();
|
||||
R<?> eleResult = eleInvoiceService.invoiceZYMake(paymentRecon.getId(), encounterId);
|
||||
Map detail = iChargeBillService.getDetail(paymentRecon.getId());
|
||||
if (eleResult.getCode() != 200) {
|
||||
// 因收费成功前端需要关闭弹窗,此处信息仅用于提示所以返回ok
|
||||
return R.ok(detail, " 收费成功,电子发票开具失败 :" + eleResult.getMsg());
|
||||
}
|
||||
return R.ok(detail);
|
||||
}
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 【取消住院结算】
|
||||
*
|
||||
* @param cancelPaymentInpatientDto 退款参数
|
||||
* @return 操作结果
|
||||
*/
|
||||
@PostMapping("/inpa-un-pay")
|
||||
public R<?> inpatientUnPay(@RequestBody CancelPaymentInpatientDto cancelPaymentInpatientDto) {
|
||||
R<?> r = paymentReconciliationService.inpatientUnPay(cancelPaymentInpatientDto.getId());
|
||||
// 付款成功后,开具发票
|
||||
if (r.getCode() == 200) {
|
||||
PaymentReconciliation paymentRecon = null;
|
||||
if (PaymentReconciliation.class.isAssignableFrom(r.getData().getClass())) {
|
||||
paymentRecon = (PaymentReconciliation)r.getData();
|
||||
}
|
||||
R<?> eleResult = eleInvoiceService.invoiceWriteoff(paymentRecon.getRelationId(), cancelPaymentInpatientDto.getReason());
|
||||
if (eleResult.getCode() != 200) {
|
||||
// 因取消付款成功前端需要关闭弹窗,此处信息仅用于提示所以返回ok
|
||||
return R.ok(null, " 取消付款成功,电子发票开具失败 :" + eleResult.getMsg());
|
||||
}
|
||||
}
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.web.paymentmanage.dto;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
|
||||
import com.openhis.yb.dto.PaymentDetailDto;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 退费入参
|
||||
*
|
||||
* @author SunJQ
|
||||
* @date 2025-05-08
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class CancelPaymentDto {
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/** 收费项 */
|
||||
private List<Long> chargeItemIds;// 收费时传收费的项目,退费时传退费的项目,2025/05/07去掉notEmpty的注解,与前端约定此字段必传,可以是空集合
|
||||
|
||||
/** 支付详细 */
|
||||
@NotEmpty
|
||||
private List<PaymentDetailDto> paymentDetails;
|
||||
|
||||
/** 支付批次号 */
|
||||
private String chrgBchno;// 医保预结算时返回,医保结算时必传,否则结算时一直预结算(弃用)
|
||||
|
||||
private String ybMdtrtCertType;// 社保卡/身份证/电子医保码
|
||||
|
||||
private String busiCardInfo;// 社保卡号/身份证号/ecToken
|
||||
|
||||
private String reason;// 退款理由
|
||||
|
||||
private String setlId;// 结算id
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.web.paymentmanage.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 住院取消结算
|
||||
*
|
||||
* @author SunJQ
|
||||
* @date 2025-08-15
|
||||
*/
|
||||
@Data
|
||||
public class CancelPaymentInpatientDto {
|
||||
/**
|
||||
* paymentId
|
||||
*/
|
||||
private Long id;
|
||||
/**
|
||||
* 退费原因
|
||||
*/
|
||||
private String reason;
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
package com.openhis.web.paymentmanage.dto;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import com.openhis.yb.dto.PaymentDetailDto;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class CancelRegPaymentDto {
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/** 收款员 */
|
||||
private Long entererId;
|
||||
|
||||
/** 支付的患者ID */
|
||||
@NotNull
|
||||
private Long patientId;
|
||||
|
||||
/** 应收金额 */
|
||||
private BigDecimal tenderedAmount;
|
||||
|
||||
/** 找零金额 */
|
||||
private BigDecimal returnedAmount;
|
||||
|
||||
/** 付款总额 */
|
||||
private BigDecimal displayAmount;
|
||||
|
||||
/** 就诊ID */
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long encounterId;
|
||||
|
||||
/** 收费项 */
|
||||
private List<Long> chargeItemIds;// 收费时传收费的项目,退费时传退费的项目,2025/05/07去掉notEmpty的注解,与前端约定此字段必传,可以是空集合
|
||||
|
||||
/** 支付详细 */
|
||||
@NotEmpty
|
||||
private List<PaymentDetailDto> paymentDetails;
|
||||
|
||||
/** 支付批次号 */
|
||||
private String chrgBchno;// 医保预结算时返回,医保结算时必传,否则结算时一直预结算
|
||||
|
||||
private String reason;// 退号理由
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.openhis.web.paymentmanage.dto;
|
||||
|
||||
import com.openhis.administration.domain.ChargeItem;
|
||||
import com.openhis.common.annotation.Dict;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class ChargeItemDetailVO {
|
||||
|
||||
@Dict(dictCode = "chrgitm_lv")
|
||||
private String dirClass;//医保等级
|
||||
|
||||
private String chargeItemName;//医保等级
|
||||
|
||||
/** 数量 */
|
||||
private Integer quantityValue;
|
||||
|
||||
/** 单位 */
|
||||
@Dict(dictCode = "prcunt_type")
|
||||
private String quantityUnit;
|
||||
|
||||
/** 单价 */
|
||||
private BigDecimal unitPrice;
|
||||
|
||||
/** 总价 */
|
||||
private BigDecimal totalPrice;
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.web.paymentmanage.dto;
|
||||
|
||||
import com.openhis.administration.domain.ChargeItem;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 收费项目
|
||||
*
|
||||
* @author SunJQ
|
||||
* @date 2025-03-31
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class ChargeItemDto extends ChargeItem {
|
||||
|
||||
private String typeCode;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.openhis.web.paymentmanage.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Data
|
||||
public class ChargeItemExtendInfoDto {
|
||||
private Long orgId;
|
||||
private String orgName;
|
||||
private BigDecimal totalPrice;
|
||||
private String ybType;
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.web.paymentmanage.dto;
|
||||
|
||||
import com.openhis.administration.domain.ChargeItem;
|
||||
import com.openhis.financial.domain.Contract;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* chargeItem分组
|
||||
*
|
||||
* @author SunJQ
|
||||
* @date 2025-05-08
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class ChargeItemGroupDto {
|
||||
/**
|
||||
* 合同
|
||||
*/
|
||||
Contract contract;
|
||||
/**
|
||||
* 收费项
|
||||
*/
|
||||
List<ChargeItem> chargeItemList;
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.openhis.web.paymentmanage.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class ChargeSummaryDto {
|
||||
|
||||
private String startTime;
|
||||
private String endTime;
|
||||
private List<Long> orgIdList;
|
||||
}
|
||||
@@ -0,0 +1,91 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.web.paymentmanage.dto;
|
||||
|
||||
import com.alibaba.fastjson2.annotation.JSONField;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 预结算结果集
|
||||
*
|
||||
* @author SunJQ
|
||||
* @date 2025-05-08
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class Clinic2206OrderResultDto {
|
||||
|
||||
@JSONField(name = "medfee_sumamt")
|
||||
private BigDecimal medfeeSumamt; // 医疗费总额
|
||||
|
||||
@JSONField(name = "fulamt_ownpay_amt")
|
||||
private BigDecimal fulamtOwnpayAmt; // 全自费金额
|
||||
|
||||
@JSONField(name = "overlmt_selfpay")
|
||||
private BigDecimal overlmtSelfpay; // 超限价自费费用
|
||||
|
||||
@JSONField(name = "preselfpay_amt")
|
||||
private BigDecimal preselfpayAmt; // 先行自付金额
|
||||
|
||||
@JSONField(name = "inscp_scp_amt")
|
||||
private BigDecimal inscpScpAmt; // 符合政策范围金额
|
||||
|
||||
@JSONField(name = "act_pay_dedc")
|
||||
private BigDecimal actPayDedc; // 实际支付起付线
|
||||
|
||||
@JSONField(name = "hifp_pay")
|
||||
private BigDecimal hifpPay; // 基本医疗保险统筹基金支出
|
||||
|
||||
@JSONField(name = "pool_prop_selfpay")
|
||||
private BigDecimal poolPropSelfpay; // 基本医疗保险统筹基金支付比例
|
||||
|
||||
@JSONField(name = "cvlserv_pay")
|
||||
private BigDecimal cvlservPay; // 公务员医疗补助资金支出
|
||||
|
||||
@JSONField(name = "hifes_pay")
|
||||
private BigDecimal hifesPay; // 企业补充医疗保险基金支出
|
||||
|
||||
@JSONField(name = "hifmi_pay")
|
||||
private BigDecimal hifmiPay; // 居民大病保险资金支出
|
||||
|
||||
@JSONField(name = "hifob_pay")
|
||||
private BigDecimal hifobPay; // 职工大额医疗费用补助基金支出
|
||||
|
||||
@JSONField(name = "maf_pay")
|
||||
private BigDecimal mafPay; // 医疗救助基金支出
|
||||
|
||||
@JSONField(name = "oth_pay")
|
||||
private BigDecimal othPay; // 其他支出
|
||||
|
||||
@JSONField(name = "fund_pay_sumamt")
|
||||
private BigDecimal fundPaySumamt; // 基金支付总额
|
||||
|
||||
@JSONField(name = "psn_part_amt")
|
||||
private BigDecimal psnPartAmt; // 个人负担总金额
|
||||
|
||||
@JSONField(name = "acct_pay")
|
||||
private BigDecimal acctPay; // 个人账户支出
|
||||
|
||||
@JSONField(name = "psn_cash_pay")
|
||||
private BigDecimal psnCashPay; // 个人现金支出
|
||||
|
||||
@JSONField(name = "hosp_part_amt")
|
||||
private BigDecimal hospPartAmt; // 医院负担金额
|
||||
|
||||
@JSONField(name = "hifdm_pay")
|
||||
private BigDecimal hifdmPay;
|
||||
|
||||
@JSONField(name = "acct_mulaid_pay")
|
||||
private BigDecimal acctMulaidPay; // 个人账户共济支付金额
|
||||
|
||||
private String chrgBchno;//收费批次号
|
||||
|
||||
private Long accountId;//账户id
|
||||
|
||||
private String medType;//医疗类型
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.openhis.web.paymentmanage.dto;
|
||||
|
||||
import com.openhis.yb.dto.Clinic2207OrderResult;
|
||||
import lombok.Data;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@Accessors(chain = true)
|
||||
public class Clinic2207OrderResultDto extends Clinic2207OrderResult {
|
||||
|
||||
private Long accountId;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.web.paymentmanage.dto;
|
||||
|
||||
import com.alibaba.fastjson2.annotation.JSONField;
|
||||
import com.openhis.yb.dto.Clinic2206FundPaymentResult;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 结算基础信息
|
||||
*
|
||||
* @author SunJQ
|
||||
* @date 2025-05-08
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class Clinic2207OrderResultInfoDto {
|
||||
// 主键字段
|
||||
@JSONField(name = "mdtrt_id")
|
||||
private String mdtrtId; // 就诊ID
|
||||
|
||||
@JSONField(name = "psn_no")
|
||||
private String psnNo; // 人员编号
|
||||
|
||||
@JSONField(name = "psn_name")
|
||||
private String psnName; // 人员姓名
|
||||
|
||||
@JSONField(name = "psn_cert_type")
|
||||
private String psnCertType; // 人员证件类型
|
||||
|
||||
@JSONField(name = "certno")
|
||||
private String certno; // 证件号码
|
||||
|
||||
@JSONField(name = "gend")
|
||||
private String gend; // 性别
|
||||
|
||||
@JSONField(name = "naty")
|
||||
private String naty; // 民族
|
||||
|
||||
@JSONField(name = "brdy")
|
||||
private Date brdy; // 出生日期
|
||||
|
||||
@JSONField(name = "age")
|
||||
private BigDecimal age; // 年龄
|
||||
|
||||
@JSONField(name = "insutype")
|
||||
private String insutype; // 险种类型
|
||||
|
||||
@JSONField(name = "psn_type")
|
||||
private String psnType; // 人员类别
|
||||
|
||||
@JSONField(name = "cvlserv_flag")
|
||||
private String cvlservFlag; // 公务员标志
|
||||
|
||||
@JSONField(name = "setl_time")
|
||||
private Date setlTime; // 结算时间
|
||||
|
||||
@JSONField(name = "mdtrt_cert_type")
|
||||
private String mdtrtCertType; // 就诊凭证类型
|
||||
|
||||
@JSONField(name = "med_type")
|
||||
private String medType; // 医疗类别
|
||||
|
||||
@JSONField(name = "medins_setl_id")
|
||||
private String medinsSetlId; // 医药机构结算ID 存放发送方报文ID
|
||||
|
||||
@JSONField(name = "setldetail")
|
||||
private List<Clinic2206FundPaymentResult> setldetail;// 结算详细信息
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.web.paymentmanage.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 发放数量 dto
|
||||
*
|
||||
* @author zwh
|
||||
* @date 2025-06-04
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class DispenseQuantityDto {
|
||||
|
||||
/*
|
||||
* 本次结算应上传最小包装药品追溯码数量
|
||||
*/
|
||||
private Integer minpacuntDrugTracCnt;
|
||||
|
||||
/*
|
||||
* 本次结算应上传耗材追溯码数量
|
||||
*/
|
||||
private Integer mcsTracCnt;
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.openhis.web.paymentmanage.dto;
|
||||
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class EleInvioceBillDto {
|
||||
|
||||
JSONObject jsonObject;
|
||||
|
||||
String endpoint;
|
||||
|
||||
String baseUrl;
|
||||
|
||||
String appID;
|
||||
|
||||
String appKey;
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.web.paymentmanage.dto;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import com.openhis.common.annotation.Dict;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 收费项目明细
|
||||
*
|
||||
* @author yuxj
|
||||
* @date 2025-04-22
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class EleInvoiceChargeDetailDto {
|
||||
|
||||
// 医疗收费项目类别;
|
||||
private String ybType;
|
||||
// 数量
|
||||
private Integer number;
|
||||
// 金额
|
||||
private BigDecimal amt;
|
||||
// 自费金额
|
||||
private BigDecimal selfAmt;
|
||||
// 收费项目名称
|
||||
private String chargeName;
|
||||
// 收费项目代码
|
||||
private String chargeCode;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.web.paymentmanage.dto;
|
||||
|
||||
import com.alibaba.fastjson2.annotation.JSONField;
|
||||
import com.openhis.common.annotation.Dict;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 清单项目明细
|
||||
*
|
||||
* @author yuxj
|
||||
* @date 2025-04-22
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class EleInvoiceListDetailDto {
|
||||
// 明细流水号
|
||||
private Long listDetailNo;
|
||||
// 医疗收费项目类别;
|
||||
private String ybType;
|
||||
// 药品编码
|
||||
private String code;
|
||||
// 药品名称
|
||||
private String name;
|
||||
// 医保项目编码
|
||||
private String ybCode;
|
||||
// 计量单位
|
||||
private String unit;
|
||||
// 单价
|
||||
private BigDecimal std;
|
||||
// 数量
|
||||
private Integer number;
|
||||
// 金额
|
||||
private BigDecimal amt;
|
||||
// 自费金额
|
||||
private BigDecimal selfAmt;
|
||||
// 医保药品分类
|
||||
private Integer medicalCareType;
|
||||
// 收费项目名称
|
||||
private String chargeName;
|
||||
// 收费项目代码
|
||||
private String chargeCode;
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.web.paymentmanage.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 患者信息
|
||||
*
|
||||
* @author yuxj
|
||||
* @date 2025-04-22
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class EleInvoicePatientInfoDto {
|
||||
// 患者id
|
||||
private Long payerId;
|
||||
|
||||
// 患者姓名
|
||||
private String payer;
|
||||
|
||||
// 患者院内编码/病历号
|
||||
private String caseNumber;
|
||||
|
||||
// 性别
|
||||
private Integer genderEnum;
|
||||
private String genderEnum_enumText;
|
||||
|
||||
// 生日
|
||||
private Date birthDate;
|
||||
|
||||
// 电话
|
||||
private String tel;
|
||||
|
||||
// 身份证号
|
||||
private String cardNo;
|
||||
|
||||
// 就诊编码
|
||||
private String encounterBusNo;
|
||||
|
||||
// 就诊日期
|
||||
private String consultationDate;
|
||||
|
||||
// 住院日期
|
||||
private String inHospitalDate;
|
||||
|
||||
// 出院日期
|
||||
private String outHospitalDate;
|
||||
|
||||
// 就诊科室名称
|
||||
private String patientCategory;
|
||||
|
||||
// 就诊科室编码
|
||||
private String patientCategoryCode;
|
||||
|
||||
// 医疗机构类型
|
||||
private String medicalInstitution;
|
||||
|
||||
// 医保区域编码
|
||||
private String medCareAreaCode;
|
||||
|
||||
// 入院科室编码
|
||||
private String categoryCode;
|
||||
// 入院科室名称
|
||||
private String category;
|
||||
// 出院科室编码
|
||||
private String leaveCategoryCode;
|
||||
// 出院科室名称
|
||||
private String leaveCategory;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.web.paymentmanage.dto;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.apache.poi.hpsf.Decimal;
|
||||
|
||||
/**
|
||||
* 付款信息
|
||||
*
|
||||
* @author yuxj
|
||||
* @date 2025-04-22
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class EleInvoicePaymentInfoDto {
|
||||
// 付款状态
|
||||
private Integer paymentStatus;
|
||||
|
||||
// 发票id
|
||||
private Long invoiceId;
|
||||
|
||||
// 发票状态
|
||||
private Integer invoiceStatus;
|
||||
|
||||
// 结算id
|
||||
private Long paymentId;
|
||||
|
||||
// 支付的业务标识符(用于显示,支付流水号)
|
||||
private String busNo;
|
||||
|
||||
// 收费员
|
||||
private String payee;
|
||||
|
||||
// 开票总金额
|
||||
private BigDecimal totalAmt;
|
||||
|
||||
// 个人现金支付金额
|
||||
private BigDecimal rmbCashPayAmount;
|
||||
// 个人现金支付金额(微信)
|
||||
private BigDecimal wxPayAmount;
|
||||
// 个人现金支付金额(支付宝)
|
||||
private BigDecimal aliPayAmount;
|
||||
// 个人现金支付金额(银联)
|
||||
private BigDecimal debitPayAmount;
|
||||
// 个人医保账户支付
|
||||
private BigDecimal zhPayAmount;
|
||||
// 基金支付总额
|
||||
private BigDecimal ybFundPayAmount;
|
||||
// 其他(如医院负担金额)
|
||||
private BigDecimal otherPayAmount;
|
||||
// 账户共济支付金额
|
||||
private BigDecimal aelfYbZhGjValue;
|
||||
|
||||
// 付款账单集合
|
||||
private String chargeItemIds;
|
||||
|
||||
//结算时间
|
||||
private String billDate;
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.web.paymentmanage.dto;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import com.openhis.common.annotation.Dict;
|
||||
|
||||
import com.openhis.common.enums.InvoiceStatus;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 返回信息
|
||||
*
|
||||
* @author yuxj
|
||||
* @date 2025-04-22
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class EleInvoiceResultDto {
|
||||
|
||||
private Long id;
|
||||
|
||||
/** 患者ID */
|
||||
private Long patientId;
|
||||
|
||||
/** 状态 */
|
||||
private InvoiceStatus statusEnum;
|
||||
|
||||
/** 类别 */
|
||||
private String typeCode;
|
||||
|
||||
/** 取消原因 */
|
||||
private String cancelledReason;
|
||||
|
||||
/** 收费项 */
|
||||
private String chargeItemIds;
|
||||
|
||||
/** 发票净额总记 */
|
||||
private BigDecimal totalNet;
|
||||
|
||||
/** 发票总计金额 */
|
||||
private BigDecimal totalGross;
|
||||
|
||||
/** 付款详情 */
|
||||
private String paymentTerms;
|
||||
|
||||
/** 账单批次号 */
|
||||
private String batchCode;
|
||||
|
||||
/** 结算批次号 */
|
||||
private String qrCode;
|
||||
|
||||
/** 发票编号 */
|
||||
private String busNo;
|
||||
|
||||
/** 开票员 */
|
||||
private Long invoicingStaffId;
|
||||
/** 电子票据代码 */
|
||||
private String billBatchCode;
|
||||
/** 电子票据号码 */
|
||||
private String billNo;
|
||||
/** 电子校验码 */
|
||||
private String random;
|
||||
/** 电子票据生成时间 */
|
||||
private String billCreateTime;
|
||||
/** 电子票据二维码图片数据 */
|
||||
private String billQrCode;
|
||||
/** 电子票据H5页面URL */
|
||||
private String pictureUrl;
|
||||
/** 电子票据外网H5页面URL */
|
||||
private String pictureNetUrl;
|
||||
}
|
||||
@@ -0,0 +1,313 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.web.paymentmanage.dto;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.alibaba.fastjson2.annotation.JSONField;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.openhis.yb.dto.Clinic2206FundPaymentResult;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* TODO:请概括描述当前类的主要用途和注意事项
|
||||
*
|
||||
* @author SunJQ
|
||||
* @date 2025-08-11
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class InpatientPreSettleDto {
|
||||
|
||||
/**
|
||||
* 就诊ID
|
||||
*/
|
||||
@JsonProperty("mdtrt_id")
|
||||
private String mdtrtId;
|
||||
|
||||
/**
|
||||
* 人员编号
|
||||
*/
|
||||
@JsonProperty("psn_no")
|
||||
private String psnNo;
|
||||
|
||||
/**
|
||||
* 人员姓名
|
||||
*/
|
||||
@JsonProperty("psn_name")
|
||||
private String psnName;
|
||||
|
||||
/**
|
||||
* 人员证件类型
|
||||
*/
|
||||
@JsonProperty("psn_cert_type")
|
||||
private String psnCertType;
|
||||
|
||||
/**
|
||||
* 证件号码
|
||||
*/
|
||||
@JsonProperty("certno")
|
||||
private String certno;
|
||||
|
||||
/**
|
||||
* 性别
|
||||
*/
|
||||
@JsonProperty("gend")
|
||||
private String gend;
|
||||
|
||||
/**
|
||||
* 民族
|
||||
*/
|
||||
@JsonProperty("naty")
|
||||
private String naty;
|
||||
|
||||
/**
|
||||
* 出生日期 格式:yyyy-MM-dd
|
||||
*/
|
||||
@JsonProperty("brdy")
|
||||
private Date brdy;
|
||||
|
||||
/**
|
||||
* 年龄
|
||||
*/
|
||||
@JsonProperty("age")
|
||||
private BigDecimal age;
|
||||
|
||||
/**
|
||||
* 险种类型
|
||||
*/
|
||||
@JsonProperty("insutype")
|
||||
private String insutype;
|
||||
|
||||
/**
|
||||
* 人员类别
|
||||
*/
|
||||
@JsonProperty("psn_type")
|
||||
private String psnType;
|
||||
|
||||
/**
|
||||
* 公务员标志
|
||||
*/
|
||||
@JsonProperty("cvlserv_flag")
|
||||
private String cvlservFlag;
|
||||
|
||||
/**
|
||||
* 结算时间 格式:yyyy-MM-dd HH:mm:ss
|
||||
*/
|
||||
@JsonProperty("setl_time")
|
||||
private Date setlTime;
|
||||
|
||||
/**
|
||||
* 就诊凭证类型
|
||||
*/
|
||||
@JsonProperty("mdtrt_cert_type")
|
||||
private String mdtrtCertType;
|
||||
|
||||
/**
|
||||
* 医疗类别
|
||||
*/
|
||||
@JsonProperty("med_type")
|
||||
private String medType;
|
||||
|
||||
/**
|
||||
* 医疗费总额
|
||||
*/
|
||||
@JsonProperty("medfee_sumamt")
|
||||
private BigDecimal medfeeSumamt;
|
||||
|
||||
/**
|
||||
* 全自费金额
|
||||
*/
|
||||
@JsonProperty("fulamt_ownpay_amt")
|
||||
private BigDecimal fulamtOwnpayAmt;
|
||||
|
||||
/**
|
||||
* 超限价自费费用
|
||||
*/
|
||||
@JsonProperty("overlmt_selfpay")
|
||||
private BigDecimal overlmtSelfpay;
|
||||
|
||||
/**
|
||||
* 先行自付金额
|
||||
*/
|
||||
@JsonProperty("preselfpay_amt")
|
||||
private BigDecimal preselfpayAmt;
|
||||
|
||||
/**
|
||||
* 符合政策范围金额
|
||||
*/
|
||||
@JsonProperty("inscp_scp_amt")
|
||||
private BigDecimal inscpScpAmt;
|
||||
|
||||
/**
|
||||
* 实际支付起付线
|
||||
*/
|
||||
@JsonProperty("act_pay_dedc")
|
||||
private BigDecimal actPayDedc;
|
||||
|
||||
/**
|
||||
* 基本医疗保险统筹基金支出
|
||||
*/
|
||||
@JsonProperty("hifp_pay")
|
||||
private BigDecimal hifpPay;
|
||||
|
||||
/**
|
||||
* 基本医疗保险统筹基金支付比例
|
||||
*/
|
||||
@JsonProperty("pool_prop_selfpay")
|
||||
private BigDecimal poolPropSelfpay;
|
||||
|
||||
/**
|
||||
* 公务员医疗补助资金支出
|
||||
*/
|
||||
@JsonProperty("cvlserv_pay")
|
||||
private BigDecimal cvlservPay;
|
||||
|
||||
/**
|
||||
* 企业补充医疗保险基金支出
|
||||
*/
|
||||
@JsonProperty("hifes_pay")
|
||||
private BigDecimal hifesPay;
|
||||
|
||||
/**
|
||||
* 居民大病保险资金支出
|
||||
*/
|
||||
@JsonProperty("hifmi_pay")
|
||||
private BigDecimal hifmiPay;
|
||||
|
||||
/**
|
||||
* 职工大额医疗费用补助基金支出
|
||||
*/
|
||||
@JsonProperty("hifob_pay")
|
||||
private BigDecimal hifobPay;
|
||||
|
||||
/**
|
||||
* 医疗救助基金支出
|
||||
*/
|
||||
@JsonProperty("maf_pay")
|
||||
private BigDecimal mafPay;
|
||||
|
||||
/**
|
||||
* 其他支出
|
||||
*/
|
||||
@JsonProperty("oth_pay")
|
||||
private BigDecimal othPay;
|
||||
|
||||
/**
|
||||
* 基金支付总额
|
||||
*/
|
||||
@JsonProperty("fund_pay_sumamt")
|
||||
private BigDecimal fundPaySumamt;
|
||||
|
||||
/**
|
||||
* 个人负担总金额
|
||||
*/
|
||||
@JsonProperty("psn_part_amt")
|
||||
private BigDecimal psnPartAmt;
|
||||
|
||||
/**
|
||||
* 个人账户支出
|
||||
*/
|
||||
@JsonProperty("acct_pay")
|
||||
private BigDecimal acctPay;
|
||||
|
||||
/**
|
||||
* 个人现金支出
|
||||
*/
|
||||
@JsonProperty("psn_cash_pay")
|
||||
private BigDecimal psnCashPay;
|
||||
|
||||
/**
|
||||
* 医院负担金额
|
||||
*/
|
||||
@JsonProperty("hosp_part_amt")
|
||||
private BigDecimal hospPartAmt;
|
||||
|
||||
/**
|
||||
* 余额
|
||||
*/
|
||||
@JsonProperty("balc")
|
||||
private BigDecimal balc;
|
||||
|
||||
/**
|
||||
* 个人账户共济支付金额
|
||||
*/
|
||||
@JsonProperty("acct_mulaid_pay")
|
||||
private BigDecimal acctMulaidPay;
|
||||
|
||||
/**
|
||||
* 医药机构结算ID 存放发送方报文ID
|
||||
*/
|
||||
@JsonProperty("medins_setl_id")
|
||||
private String medinsSetlId;
|
||||
|
||||
/**
|
||||
* 清算经办机构
|
||||
*/
|
||||
@JsonProperty("clr_optins")
|
||||
private String clrOptins;
|
||||
|
||||
/**
|
||||
* 清算方式
|
||||
*/
|
||||
@JsonProperty("clr_way")
|
||||
private String clrWay;
|
||||
|
||||
/**
|
||||
* 清算类别
|
||||
*/
|
||||
@JsonProperty("clr_type")
|
||||
private String clrType;
|
||||
|
||||
/**
|
||||
* 伤残人员医疗保障基金支出 1.5.4新增
|
||||
*/
|
||||
@JsonProperty("hifdm_pay")
|
||||
private BigDecimal hifdmPay;
|
||||
|
||||
@JSONField(name = "setldetail")
|
||||
private List<Clinic2206FundPaymentResult> setldetail;
|
||||
|
||||
/**
|
||||
* 账户id
|
||||
*/
|
||||
private Long accountId;
|
||||
|
||||
public InpatientPreSettleDto() {
|
||||
this.medfeeSumamt = BigDecimal.ZERO;
|
||||
this.fulamtOwnpayAmt = BigDecimal.ZERO;
|
||||
this.overlmtSelfpay = BigDecimal.ZERO;
|
||||
this.preselfpayAmt = BigDecimal.ZERO;
|
||||
this.inscpScpAmt = BigDecimal.ZERO;
|
||||
this.actPayDedc = BigDecimal.ZERO;
|
||||
this.hifpPay = BigDecimal.ZERO;
|
||||
this.poolPropSelfpay = BigDecimal.ZERO;
|
||||
this.cvlservPay = BigDecimal.ZERO;
|
||||
this.hifesPay = BigDecimal.ZERO;
|
||||
this.hifmiPay = BigDecimal.ZERO;
|
||||
this.hifobPay = BigDecimal.ZERO;
|
||||
this.mafPay = BigDecimal.ZERO;
|
||||
this.othPay = BigDecimal.ZERO;
|
||||
this.fundPaySumamt = BigDecimal.ZERO;
|
||||
this.psnPartAmt = BigDecimal.ZERO;
|
||||
this.acctPay = BigDecimal.ZERO;
|
||||
this.psnCashPay = BigDecimal.ZERO;
|
||||
this.hospPartAmt = BigDecimal.ZERO;
|
||||
this.balc = BigDecimal.ZERO;
|
||||
this.acctMulaidPay = BigDecimal.ZERO;
|
||||
this.hifdmPay = BigDecimal.ZERO;
|
||||
}
|
||||
|
||||
public Long getAccountId() {
|
||||
return accountId;
|
||||
}
|
||||
|
||||
public void setAccountId(Long accountId) {
|
||||
this.accountId = accountId;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.web.paymentmanage.dto;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.openhis.financial.domain.PaymentReconciliation;
|
||||
import com.openhis.financial.model.PaymentRecDetailDto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 住院预结算回显数据
|
||||
*
|
||||
* @author SunJQ
|
||||
* @date 2025-08-11
|
||||
*/
|
||||
@Data
|
||||
public class InpatientPreSettleResultDto {
|
||||
/**
|
||||
* 收费详情
|
||||
*/
|
||||
List<PaymentRecDetailDto> paymentRecDetailDtoList;
|
||||
/**
|
||||
* 付款实体(业务payment)
|
||||
*/
|
||||
PaymentReconciliation paymentReconciliation;
|
||||
/**
|
||||
* 付款实体(多退少补)
|
||||
*/
|
||||
PaymentReconciliation newPayment;
|
||||
/**
|
||||
* 付款实体(预交金)
|
||||
*/
|
||||
PaymentReconciliation oldPayment;
|
||||
/**
|
||||
* 付款id(业务单)
|
||||
*/
|
||||
private String id;// paymentId
|
||||
/**
|
||||
* 付款id(预交金原单)
|
||||
*/
|
||||
private String oldId;
|
||||
/**
|
||||
* 付款id(多退少补单)
|
||||
*/
|
||||
private String newId;
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.web.paymentmanage.dto;
|
||||
|
||||
import com.alibaba.fastjson2.annotation.JSONField;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 电子发票基础信息查询实体
|
||||
*
|
||||
* @author SunJQ
|
||||
* @date 2025-05-09
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class InvoiceBaseInfoDto {
|
||||
//主键
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@JSONField(serialize=false)
|
||||
private String id;
|
||||
|
||||
private String setlId;//结算id
|
||||
|
||||
private String mdtrtId; // 就诊ID
|
||||
|
||||
private String psnName; // 人员姓名
|
||||
|
||||
private String psnCertType; // 人员证件类型
|
||||
|
||||
private String certno; // 证件号码
|
||||
|
||||
private String insutype; // 险种类型
|
||||
|
||||
private String psnType; // 人员类别
|
||||
|
||||
private String cvlservFlag; // 公务员标志
|
||||
|
||||
private Date setlTime; // 结算时间
|
||||
|
||||
private String mdtrtCertType; // 就诊凭证类型
|
||||
|
||||
private String medType; // 医疗类别
|
||||
|
||||
private BigDecimal medfeeSumamt; // 医疗费总额
|
||||
|
||||
private BigDecimal fulamtOwnpayAmt; // 全自费金额
|
||||
|
||||
private BigDecimal overlmtSelfpay; // 超限价自费费用
|
||||
|
||||
private BigDecimal preselfpayAmt; // 先行自付金额
|
||||
|
||||
private BigDecimal inscpScpAmt; // 符合政策范围金额
|
||||
|
||||
private BigDecimal actPayDedc; // 实际支付起付线
|
||||
|
||||
private BigDecimal hifpPay; // 基本医疗保险统筹基金支出
|
||||
|
||||
private BigDecimal poolPropSelfpay; // 基本医疗保险统筹基金支付比例
|
||||
|
||||
private BigDecimal cvlservPay; // 公务员医疗补助资金支出
|
||||
|
||||
private BigDecimal hifesPay; // 企业补充医疗保险基金支出
|
||||
|
||||
private BigDecimal hifmiPay; // 居民大病保险资金支出
|
||||
|
||||
private BigDecimal hifobPay; // 职工大额医疗费用补助基金支出
|
||||
|
||||
private BigDecimal mafPay; // 医疗救助基金支出
|
||||
|
||||
private BigDecimal othPay; // 其他支出
|
||||
|
||||
private BigDecimal fundPaySumamt; // 基金支付总额
|
||||
|
||||
private BigDecimal psnPartAmt; // 个人负担总金额
|
||||
|
||||
private BigDecimal acctPay; // 个人账户支出
|
||||
|
||||
private BigDecimal psnCashPay; // 个人现金支出
|
||||
|
||||
private BigDecimal hospPartAmt; // 医院负担金额
|
||||
|
||||
private BigDecimal balc; // 余额
|
||||
|
||||
private BigDecimal acctMulaidPay; // 个人账户共济支付金额
|
||||
|
||||
private String medinsSetlId; // 医药机构结算ID
|
||||
|
||||
private String clrOptins; // 清算经办机构
|
||||
|
||||
private String clrWay; // 清算方式
|
||||
|
||||
private String clrType; // 清算类别
|
||||
|
||||
private BigDecimal hifdmPay; // 伤残人员医疗保障基金支出
|
||||
|
||||
private String paymentNo;//结算业务流水号 Payment与ClinicSettle是1:N
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.openhis.web.paymentmanage.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class InvoiceWriteOffDto {
|
||||
private String paymentId;
|
||||
private String reason;
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.openhis.web.paymentmanage.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class MakeInvoiceDto {
|
||||
private Long paymentId;
|
||||
private Long encounterId;
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
package com.openhis.web.paymentmanage.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
public class OrgIncomeDto {
|
||||
/**
|
||||
* 人次
|
||||
*/
|
||||
private Integer personCnt;
|
||||
/**
|
||||
* 应收
|
||||
*/
|
||||
private BigDecimal amount;
|
||||
/**
|
||||
* 实收
|
||||
*/
|
||||
private BigDecimal receivedAmount;
|
||||
/**
|
||||
* 药品金额
|
||||
*/
|
||||
private BigDecimal medFee;
|
||||
/**
|
||||
* 处置费
|
||||
*/
|
||||
private BigDecimal serviceFee;
|
||||
//private BigDecimal receivedAmount;
|
||||
/**
|
||||
* 挂号费
|
||||
*/
|
||||
private BigDecimal registrationFee;
|
||||
/**
|
||||
* 科室名称
|
||||
*/
|
||||
private String orgName;
|
||||
|
||||
public OrgIncomeDto() {
|
||||
this.personCnt = 0;
|
||||
this.amount = BigDecimal.ZERO;
|
||||
this.receivedAmount = BigDecimal.ZERO;
|
||||
this.medFee = BigDecimal.ZERO;
|
||||
this.serviceFee = BigDecimal.ZERO;
|
||||
this.registrationFee = BigDecimal.ZERO;
|
||||
//this.orgName = orgName;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.openhis.web.paymentmanage.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class PaymentSettleDto {
|
||||
|
||||
private Date endTime;
|
||||
|
||||
private Date startTime;
|
||||
|
||||
private Long enterId;
|
||||
|
||||
private String contractNo;
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.web.paymentmanage.dto;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import com.openhis.common.annotation.Dict;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 映射对象
|
||||
*
|
||||
* @author SunJQ
|
||||
* @date 2025-05-06
|
||||
*/
|
||||
@Data
|
||||
public class PaymentVO {
|
||||
|
||||
/** ID */
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long id;//付款id
|
||||
|
||||
/** 状态 */
|
||||
@Dict(dictCode = "payment_status")
|
||||
private Integer statusEnum;
|
||||
private String statusEnum_dictText;//状态
|
||||
|
||||
/** 支付的业务标识符 */
|
||||
private String paymentNo;//业务流水
|
||||
|
||||
/** 付费/退款 */
|
||||
@Dict(dictCode = "payment_enum")
|
||||
private String paymentEnum;//付费/退款
|
||||
private String paymentEnum_dictText;
|
||||
|
||||
/** 关联ID */
|
||||
private Long relationId;
|
||||
private String relationIdStr;
|
||||
|
||||
/** 收款员 */
|
||||
private Long entererId;//收款员
|
||||
|
||||
/** 收款员 */
|
||||
private String entererName;//收款员
|
||||
|
||||
/** 支付的患者ID */
|
||||
private Long patientId;//支付患者
|
||||
|
||||
/** 支付的患者 */
|
||||
private String patientName;//支付患者
|
||||
|
||||
/** 付款结果 */
|
||||
@Dict(dictCode = "outcome_enum")
|
||||
private Integer outcomeEnum;//付款结果
|
||||
private String outcomeEnum_dictText;
|
||||
|
||||
/** 应收金额 */
|
||||
private BigDecimal tenderedAmount;//应收
|
||||
|
||||
/** 找零金额 */
|
||||
private BigDecimal returnedAmount;//找零
|
||||
|
||||
/** 付款总额 */
|
||||
private BigDecimal displayAmount;//付款总额
|
||||
|
||||
/** 打印标识 */
|
||||
private Integer printCount;//打印标志
|
||||
|
||||
/** 结算时间 */
|
||||
private Date billDate;//结算时间
|
||||
|
||||
/** 发票编号 */
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long invoiceId;//发票id
|
||||
|
||||
/** 发票no */
|
||||
private String invoiceNo;//发票no
|
||||
|
||||
/** 发票no */
|
||||
private String encounterBusNo;//发票no
|
||||
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long encounterId;//就诊id
|
||||
private String encounterIdStr;//就诊id
|
||||
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private String paymentId;//付款id
|
||||
|
||||
private String ybSettleIds;//医保付款id
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.openhis.web.paymentmanage.dto;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ReportVo {
|
||||
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date startTime;// 开始时间
|
||||
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
|
||||
private Date endTime;// 结束时间
|
||||
private Long entererId;// 收款员
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.openhis.web.paymentmanage.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 日结单返回实体
|
||||
*/
|
||||
@Data
|
||||
public class ReturnBillVO {
|
||||
private String paymentNo;//收费单
|
||||
private BigDecimal totalAmount;//应收
|
||||
private BigDecimal paidAmount;//实收
|
||||
private String invoiceNo;//发票编号
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.openhis.web.paymentmanage.mapper;
|
||||
|
||||
import com.openhis.web.paymentmanage.dto.ChargeItemDetailVO;
|
||||
import com.openhis.web.paymentmanage.dto.ChargeItemExtendInfoDto;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Component
|
||||
public interface ChargeBillMapper {
|
||||
/**
|
||||
* 获取收费项的统计信息
|
||||
* @param chargeItemIds 收费项的ID
|
||||
* @return 查询信息
|
||||
*/
|
||||
List<ChargeItemExtendInfoDto> selectChargeItemExtendInfoList(@Param("list") List<Long> chargeItemIds, @Param("orgIdList")List<Long> orgIdList);
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.web.paymentmanage.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.openhis.web.paymentmanage.dto.EleInvoiceChargeDetailDto;
|
||||
import com.openhis.web.paymentmanage.dto.EleInvoiceListDetailDto;
|
||||
|
||||
import com.openhis.web.paymentmanage.dto.EleInvoicePatientInfoDto;
|
||||
import com.openhis.web.paymentmanage.dto.EleInvoicePaymentInfoDto;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 电子发票
|
||||
*
|
||||
* @author yuxj
|
||||
* @date 2025-04-22
|
||||
*/
|
||||
public interface EleInvoiceMapper {
|
||||
|
||||
/**
|
||||
* 获取付款信息
|
||||
*
|
||||
* @param paymentId 付款ID
|
||||
* @param encounterId 就诊ID
|
||||
*/
|
||||
EleInvoicePaymentInfoDto getPaymentInfo(@Param("paymentId") Long paymentId,@Param("encounterId") Long encounterId,@Param("selfYbZhPay") Integer selfYbZhPay, @Param("selfCashPay") Integer selfCashPay,
|
||||
@Param("selfCashVxValue") Integer selfCashVxValue, @Param("selfCashAliValue") Integer selfCashAliValue,
|
||||
@Param("selfCashUnionValue") Integer selfCashUnionValue, @Param("ybFundPay") Integer ybFundPay, @Param("otherPay") Integer otherPay, @Param("selfYbZhGjValue") Integer selfYbZhGjValue);
|
||||
|
||||
/**
|
||||
* 获取患者信息
|
||||
*
|
||||
* @param encounterId 就诊ID
|
||||
* @param encClassEnum 类别编码
|
||||
* @param orgClassEnum 类别编码
|
||||
*/
|
||||
EleInvoicePatientInfoDto getPatientInfo(@Param("encounterId") Long encounterId,
|
||||
@Param("encClassEnum") Integer encClassEnum, @Param("orgClassEnum") Integer orgClassEnum);
|
||||
|
||||
/**
|
||||
* 获取收费项目明细
|
||||
*
|
||||
* @param encounterId 就诊ID
|
||||
* @param ybTypeList 医疗收费项目类别
|
||||
* @param chrgitmType 字典类型
|
||||
* @param contrastType 对照类型
|
||||
*/
|
||||
List<EleInvoiceChargeDetailDto> getChargeDetail(@Param("encounterId") Long encounterId,
|
||||
@Param("ybTypeList") List<String> ybTypeList, @Param("chrgitmType") String chrgitmType,
|
||||
@Param("contrastType") Integer contrastType,@Param("chargeItemIds") List<Long> chargeItemIds);
|
||||
|
||||
/**
|
||||
* 获取清单项目明细
|
||||
*
|
||||
* @param encounterId 就诊ID
|
||||
* @param ybTypeList 医疗收费项目类别
|
||||
* @param chrgitmType 字典类型
|
||||
* @param contrastType 对照类型
|
||||
*/
|
||||
List<EleInvoiceListDetailDto> getListDetail(@Param("encounterId") Long encounterId,
|
||||
@Param("ybTypeList") List<String> ybTypeList, @Param("chrgitmType") String chrgitmType,
|
||||
@Param("contrastType") Integer contrastType,@Param("chargeItemIds") List<Long> chargeItemIds);
|
||||
|
||||
/**
|
||||
* 获取挂号清单项目明细
|
||||
*
|
||||
* @param encounterId 就诊ID
|
||||
* @param ybTypeList 医疗收费项目类别
|
||||
* @param chrgitmType 字典类型
|
||||
* @param contrastType 对照类型
|
||||
*/
|
||||
List<EleInvoiceListDetailDto> getRegListDetail(@Param("encounterId") Long encounterId,
|
||||
@Param("ybTypeList") List<String> ybTypeList, @Param("chrgitmType") String chrgitmType,
|
||||
@Param("contrastType") Integer contrastType,@Param("chargeItemIds") List<Long> chargeItemIds);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.web.paymentmanage.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.openhis.web.paymentmanage.dto.ChargeItemDto;
|
||||
import com.openhis.web.paymentmanage.dto.DispenseQuantityDto;
|
||||
import com.openhis.web.paymentmanage.dto.PaymentVO;
|
||||
import com.openhis.yb.dto.PaymentDetailDto;
|
||||
|
||||
/**
|
||||
* 付款Dao
|
||||
*
|
||||
* @author SunJQ
|
||||
* @date 2025-03-29
|
||||
*/
|
||||
@Repository
|
||||
public interface PaymentMapper {
|
||||
/**
|
||||
* 付款列表
|
||||
*
|
||||
* @param page
|
||||
* @param queryWrapper
|
||||
* @return
|
||||
*/
|
||||
IPage<PaymentVO> getPage(@Param("page") Page<Object> page, @Param("kindEnum") Integer kindEnum,
|
||||
@Param(Constants.WRAPPER) QueryWrapper<PaymentVO> queryWrapper);
|
||||
|
||||
/**
|
||||
* 付款详情
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
List<PaymentDetailDto> getPaymentDetailList(@Param("id") Long id);
|
||||
|
||||
/**
|
||||
* 查找某一类型的chargeItem
|
||||
*
|
||||
* @param collect
|
||||
* @param s
|
||||
*/
|
||||
List<ChargeItemDto> getChargeItemList(@Param("collect") String collect, @Param("s") String s);
|
||||
|
||||
/**
|
||||
* 查找chargeItem集合
|
||||
*
|
||||
* @param collect
|
||||
*/
|
||||
List<ChargeItemDto> getChargeItems(@Param("collect") String collect);
|
||||
|
||||
/**
|
||||
* 根据就诊ID查找收费项
|
||||
*
|
||||
* @param encounterId
|
||||
* @return
|
||||
*/
|
||||
List<ChargeItemDto> getChargeItemListByEncounterId(Long encounterId);
|
||||
|
||||
/**
|
||||
* 查询发放数量
|
||||
*
|
||||
* @param chargeItemIds 收费项ids
|
||||
* @return 发放数量
|
||||
*/
|
||||
DispenseQuantityDto selectDispenseQuantity(@Param("chargeItemIds") List<Long> chargeItemIds);
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
package com.openhis.web.paymentmanage.util;
|
||||
|
||||
import java.security.MessageDigest;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
|
||||
/**
|
||||
* 加密工具类
|
||||
*
|
||||
* @author
|
||||
*
|
||||
*/
|
||||
public class MD5Util {
|
||||
|
||||
/**
|
||||
* md5加密
|
||||
*
|
||||
* @param str
|
||||
* @return
|
||||
*/
|
||||
public static String md5(String str) {
|
||||
try {
|
||||
MessageDigest md = MessageDigest.getInstance("MD5");
|
||||
md.update(str.getBytes());
|
||||
byte[] byteDigest = md.digest();
|
||||
int i;
|
||||
StringBuffer buf = new StringBuffer("");
|
||||
for (int offset = 0; offset < byteDigest.length; offset++) {
|
||||
i = byteDigest[offset];
|
||||
if (i < 0)
|
||||
i += 256;
|
||||
if (i < 16)
|
||||
buf.append("0");
|
||||
buf.append(Integer.toHexString(i));
|
||||
}
|
||||
// 32位加密
|
||||
return buf.toString();
|
||||
// 16位的加密
|
||||
// return buf.toString().substring(8, 24);
|
||||
} catch (NoSuchAlgorithmException e) {
|
||||
e.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user