From 6e492d4d16efff769c2928109fb6a085fcad948d Mon Sep 17 00:00:00 2001
From: shiyunteng <shiyunteng@example.com>
Date: 星期一, 15 六月 2026 08:55:01 +0800
Subject: [PATCH] feat:付款合同编号不存在时错误提示
---
platformx-business-finance-biz/src/main/java/com/by4cloud/platformx/business/service/impl/PaymentConfirmServiceImpl.java | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/platformx-business-finance-biz/src/main/java/com/by4cloud/platformx/business/service/impl/PaymentConfirmServiceImpl.java b/platformx-business-finance-biz/src/main/java/com/by4cloud/platformx/business/service/impl/PaymentConfirmServiceImpl.java
index f01f00e..02ec8d9 100644
--- a/platformx-business-finance-biz/src/main/java/com/by4cloud/platformx/business/service/impl/PaymentConfirmServiceImpl.java
+++ b/platformx-business-finance-biz/src/main/java/com/by4cloud/platformx/business/service/impl/PaymentConfirmServiceImpl.java
@@ -34,6 +34,7 @@
import java.security.NoSuchAlgorithmException;
import java.util.*;
import java.util.concurrent.TimeUnit;
+import java.util.stream.Collectors;
/**
* 鏀舵纭
@@ -73,6 +74,9 @@
public R add(PaymentConfirmAddDTO addDTO) {
if (StrUtil.isNotBlank(addDTO.getContractNo())) {
Contract contract = contractService.getOne(Wrappers.<Contract>lambdaQuery().eq(Contract::getContractNo, addDTO.getContractNo()));
+ if (ObjUtil.isNull(contract)) {
+ return R.failed("鍚堝悓鏌ヨ澶辫触锛岃妫�鏌ュ悎鍚岀紪鍙�");
+ }
BusinessCustomer customer = businessCustomerService.getOne(Wrappers.<BusinessCustomer>lambdaQuery()
.eq(StrUtil.isNotBlank(addDTO.getBusGuestName()), BusinessCustomer::getRegisterName, addDTO.getBusGuestName())
.eq(StrUtil.isNotBlank(addDTO.getBusGuestId()), BusinessCustomer::getId, addDTO.getBusGuestId()));
@@ -194,7 +198,7 @@
entity.setBusGuestId(customer.getId());
entity.setBusGuestName(customer.getRegisterName());
- entity.setBusinessType("");
+ entity.setBusinessType("閫�娆�");
entity.setTransationAmount(addDTO.getTransationAmount());
BigDecimal newtotal = addDTO.getTransationAmount().multiply(new BigDecimal("-1")).add(lastConfirm.getTotalAmount());
if (newtotal.compareTo(new BigDecimal("0")) > 0) {
@@ -839,4 +843,10 @@
}
baseMapper.insert(entity);
}
+
+ @Override
+ public R queryAllBusinessType() {
+ return R.ok(baseMapper.selectList(Wrappers.<PaymentConfirm>lambdaQuery().select(PaymentConfirm::getBusinessType).isNotNull(PaymentConfirm::getBusinessType)
+ .groupBy(PaymentConfirm::getBusinessType)).stream().map(PaymentConfirm::getBusinessType).collect(Collectors.toList()));
+ }
}
\ No newline at end of file
--
Gitblit v1.9.1