版本更新

This commit is contained in:
Zhang.WH
2025-10-16 17:17:24 +08:00
parent d23a594a4b
commit f515bb8fbb
600 changed files with 7881 additions and 35954 deletions

View File

@@ -59,7 +59,7 @@ public interface IPaymentRecService {
* @param request 请求参数
* @return 结果
*/
IPage<PaymentVO> getPage(String searchKey, Integer kingEnum, Integer pageNo, Integer pageSize,
IPage<PaymentVO> getPage(String searchKey, Integer kingEnum,String invoiceNo, Integer pageNo, Integer pageSize,
HttpServletRequest request);
/**

View File

@@ -749,16 +749,15 @@ public class PaymentRecServiceImpl implements IPaymentRecService {
* @return 结果
*/
@Override
public IPage<PaymentVO> getPage(String searchKey, Integer kingEnum, Integer pageNo, Integer pageSize,
public IPage<PaymentVO> getPage(String searchKey, Integer kingEnum, String invoiceNo,Integer pageNo, Integer pageSize,
HttpServletRequest request) {
// 构建查询条件
QueryWrapper<PaymentVO> queryWrapper = HisQueryUtils.buildQueryWrapper(new PaymentVO(), searchKey,
new HashSet<>(Arrays.asList(CommonConstants.FieldName.EncounterId, CommonConstants.FieldName.ContractNo,
CommonConstants.FieldName.paymentNo)),
new HashSet<>(Arrays.asList(CommonConstants.FieldName.PatientName, CommonConstants.FieldName.paymentNo)),
request);
// queryWrapper.eq(PaymentVO::getStatusEnum,PaymentStatus.SUCCESS.getValue()).or().eq(PaymentVO::getStatusEnum,PaymentStatus.REFUND_ALL.getValue());
queryWrapper.in("status_enum", PaymentStatus.SUCCESS.getValue(), PaymentStatus.REFUND_ALL.getValue());
IPage<PaymentVO> paymentDtoIPage = paymentMapper.getPage(new Page<>(pageNo, pageSize), kingEnum, queryWrapper);
IPage<PaymentVO> paymentDtoIPage = paymentMapper.getPage(new Page<>(pageNo, pageSize), kingEnum, invoiceNo,queryWrapper);
for (PaymentVO record : paymentDtoIPage.getRecords()) {
record.setPaymentId(record.getId().toString());

View File

@@ -3,11 +3,13 @@
*/
package com.openhis.web.paymentmanage.controller;
import java.util.HashMap;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.validation.Valid;
import com.core.common.utils.SecurityUtils;
import com.openhis.web.paymentmanage.dto.CancelPaymentInpatientDto;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
@@ -84,14 +86,18 @@ public class PaymentReconciliationController {
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());
if("0".equals(SecurityUtils.getLoginUser().getOptionJson().getString("forwardSwitch"))) {
return R.ok(detail);
}else {
R<?> eleResult = eleInvoiceService.invoiceMZMake(paymentRecon.getId(), paymentDto.getEncounterId());
if (eleResult.getCode() != 200) {
// 因收费成功前端需要关闭弹窗此处信息仅用于提示所以返回ok
return R.ok(detail, " 收费成功,电子发票开具失败 :" + eleResult.getMsg());
}
}
// Map detail = iChargeBillService.getDetail(paymentRecon.getId());
return R.ok(detail);
}
return result;
}
@@ -110,12 +116,15 @@ public class PaymentReconciliationController {
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());
if(!"0".equals(SecurityUtils.getLoginUser().getOptionJson().getString("forwardSwitch"))) {
R<?> eleResult =
eleInvoiceService.invoiceWriteoff(paymentRecon.getRelationId(), cancelPaymentDto.getReason());
if (eleResult.getCode() != 200) {
// 因取消付款成功前端需要关闭弹窗此处信息仅用于提示所以返回ok
return R.ok(null, " 取消付款成功,电子发票开具失败 :" + eleResult.getMsg());
}
}
}
return result;
}
@@ -132,9 +141,10 @@ public class PaymentReconciliationController {
@GetMapping("/page")
public R<?> paymentPage(@RequestParam(value = "searchKey", defaultValue = "") String searchKey,
@RequestParam(value = "kinsEnum", defaultValue = "") Integer kinsEnum,
@RequestParam(value = "invoiceNo", defaultValue = "") String invoiceNo,
@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));
return R.ok(paymentReconciliationService.getPage(searchKey, kinsEnum, invoiceNo,pageNo, pageSize, request));
}
/**
@@ -168,21 +178,24 @@ public class PaymentReconciliationController {
@PostMapping("/reg-pay")
public R<?> regPay(@Valid @RequestBody OutpatientRegistrationSettleParam outpatientRegistrationAddParam) {
R<?> result = paymentReconciliationService.regPay(outpatientRegistrationAddParam,
outpatientRegistrationAddParam.getChrgBchno(), outpatientRegistrationAddParam.getPaymentDetails());
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());
Long encounterId = paymentRecon.getEncounterId();
if("0".equals(SecurityUtils.getLoginUser().getOptionJson().getString("forwardSwitch"))) {
return R.ok(detail);
}else {
R<?> eleResult = eleInvoiceService.invoiceRegMake(paymentRecon.getId(), encounterId);
if (eleResult.getCode() != 200) {
// 因收费成功前端需要关闭弹窗此处信息仅用于提示所以返回ok
return R.ok(detail, " 收费成功,电子发票开具失败 :" + eleResult.getMsg());
}
}
return R.ok(detail);
}
return result;
}

View File

@@ -32,7 +32,7 @@ public interface PaymentMapper {
* @param queryWrapper
* @return
*/
IPage<PaymentVO> getPage(@Param("page") Page<Object> page, @Param("kindEnum") Integer kindEnum,
IPage<PaymentVO> getPage(@Param("page") Page<Object> page, @Param("kindEnum") Integer kindEnum, @Param("invoiceNo") String invoiceNo,
@Param(Constants.WRAPPER) QueryWrapper<PaymentVO> queryWrapper);
/**