|
@@ -52,6 +52,10 @@ public class PayFeeServiceImp implements PayFeeService {
|
|
|
BaseClosingAccountInfoMapper baseClosingAccountInfoMapper;
|
|
|
|
|
|
public PayfeeResult payFeeCounter( String id,Integer payway,BigDecimal transAmount, Integer balancetype){
|
|
|
+ //交易金额不可为负数
|
|
|
+ if(transAmount.compareTo(BigDecimal.ZERO)!=1){
|
|
|
+ throw new ServiceException(ResultStatus.PAYFEE_TRANSAMOUNT_BELOW_ZERO);
|
|
|
+ }
|
|
|
// String result=""; //执行结果描述
|
|
|
String result="<br>实收金额:"+String.format("%.2f",transAmount)+"元";
|
|
|
BigDecimal fees=BigDecimal.ZERO; //抵扣金额
|
|
@@ -101,10 +105,7 @@ public class PayFeeServiceImp implements PayFeeService {
|
|
|
//如果传入时间则用传入的时间做交易时间
|
|
|
LocalDateTime localDateTime=LocalDateTime.now();
|
|
|
|
|
|
- //交易金额不可为负数
|
|
|
- if(transAmount.compareTo(BigDecimal.ZERO)==-1){
|
|
|
- throw new ServiceException(ResultStatus.PAYFEE_TRANSAMOUNT_BELOW_ZERO);
|
|
|
- }
|
|
|
+
|
|
|
|
|
|
//生成批次号
|
|
|
// 微信:W 现金、预存账户:C 银行:B 支付宝:A
|
|
@@ -273,6 +274,10 @@ public class PayFeeServiceImp implements PayFeeService {
|
|
|
*/
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
public String payFee(String accountnumber, String metercode, BigDecimal transAmount, Integer payway , LocalDateTime transTime, List<BigInteger> receivableIds,Integer siteId,Integer customerId,Integer userId) {
|
|
|
+ //交易金额不可为负数
|
|
|
+ if(transAmount.compareTo(BigDecimal.ZERO)!=1){
|
|
|
+ throw new ServiceException(ResultStatus.PAYFEE_TRANSAMOUNT_BELOW_ZERO);
|
|
|
+ }
|
|
|
LoginUser loginUser = UserUtil.getCurrentUser();
|
|
|
if(loginUser !=null){
|
|
|
if(siteId==null )
|
|
@@ -346,10 +351,7 @@ public class PayFeeServiceImp implements PayFeeService {
|
|
|
if(transTime != null){
|
|
|
localDateTime=transTime;
|
|
|
}
|
|
|
- //交易金额不可为负数
|
|
|
- if(transAmount.compareTo(BigDecimal.ZERO)==-1){
|
|
|
- throw new ServiceException(ResultStatus.PAYFEE_TRANSAMOUNT_BELOW_ZERO);
|
|
|
- }
|
|
|
+
|
|
|
|
|
|
//生成批次号
|
|
|
// 微信:W 现金、预存账户:C 银行:B 支付宝:A
|
|
@@ -514,6 +516,11 @@ public class PayFeeServiceImp implements PayFeeService {
|
|
|
*/
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
public PayfeeResult rechargefeeCounter(String accountId , BigDecimal transAmount, Integer payway ){
|
|
|
+
|
|
|
+ //交易金额不可为负数
|
|
|
+ if(transAmount.compareTo(BigDecimal.ZERO)!=1){
|
|
|
+ throw new ServiceException(ResultStatus.PAYFEE_TRANSAMOUNT_BELOW_ZERO);
|
|
|
+ }
|
|
|
LoginUser loginUser = UserUtil.getCurrentUser();
|
|
|
|
|
|
Integer siteId = loginUser.getSiteId();
|
|
@@ -535,10 +542,7 @@ public class PayFeeServiceImp implements PayFeeService {
|
|
|
//如果传入时间则用传入的时间做交易时间
|
|
|
LocalDateTime localDateTime=LocalDateTime.now();
|
|
|
|
|
|
- //交易金额不可为负数
|
|
|
- if(transAmount.compareTo(BigDecimal.ZERO)==-1){
|
|
|
- throw new ServiceException(ResultStatus.PAYFEE_TRANSAMOUNT_BELOW_ZERO);
|
|
|
- }
|
|
|
+
|
|
|
|
|
|
//根据客户id
|
|
|
PayCustomRechargeDto payCustomRechargeDto = null;
|
|
@@ -576,6 +580,10 @@ public class PayFeeServiceImp implements PayFeeService {
|
|
|
*/
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
public String rechargefee(String accountnumber, String metercode, BigDecimal transAmount, Integer payway , LocalDateTime transTime,Integer siteId,Integer customerId,Integer userId){
|
|
|
+ //交易金额不可为负数
|
|
|
+ if(transAmount.compareTo(BigDecimal.ZERO)!=1){
|
|
|
+ throw new ServiceException(ResultStatus.PAYFEE_TRANSAMOUNT_BELOW_ZERO);
|
|
|
+ }
|
|
|
LoginUser loginUser = UserUtil.getCurrentUser();
|
|
|
if(loginUser !=null) {
|
|
|
if (siteId == null) {
|
|
@@ -603,10 +611,7 @@ public class PayFeeServiceImp implements PayFeeService {
|
|
|
if(transTime != null){
|
|
|
localDateTime=transTime;
|
|
|
}
|
|
|
- //交易金额不可为负数
|
|
|
- if(transAmount.compareTo(BigDecimal.ZERO)==-1){
|
|
|
- throw new ServiceException(ResultStatus.PAYFEE_TRANSAMOUNT_BELOW_ZERO);
|
|
|
- }
|
|
|
+
|
|
|
|
|
|
//根据客编或者水编获取客户信息
|
|
|
PayCustomRechargeDto payCustomRechargeDto = null;
|