Parcourir la source

应付账款 原账户有3.32,提现3元后,付款是出现这个

lipf il y a 2 mois
Parent
commit
993b6e4d16

+ 1 - 1
tenant/organization/src/main/java/com/jzg/organization/service/impl/SysAmountAuditingServiceImpl.java

@@ -214,7 +214,7 @@ public class SysAmountAuditingServiceImpl extends ServiceImpl<SysAmountAuditingM
                 // 更新用户账户
                 // 更新用户账户
                 SysUserAccount userAccount = userAccountService.queryByUserId(audit.getUserId(),systemCode);
                 SysUserAccount userAccount = userAccountService.queryByUserId(audit.getUserId(),systemCode);
                 AssertionUtils.isFail(Objects.isNull(userAccount), "用户账户数据异常!");
                 AssertionUtils.isFail(Objects.isNull(userAccount), "用户账户数据异常!");
-                AssertionUtils.isFail(audit.getAmount().compareTo(audit.getBalanceAmount()) > 0, "提现金额大于账户余额!");
+                AssertionUtils.isFail(audit.getAmount().compareTo(userAccount.getSumAmountUnpaid()) > 0, "提现金额大于账户余额!");
                 if(userAccount.getSumAmountUnpaid().compareTo(audit.getAmount()) < 0){
                 if(userAccount.getSumAmountUnpaid().compareTo(audit.getAmount()) < 0){
                     log.info("账户金额少于提现金额,请审核账户。 userId=[{}}], userAccount.getSumAmount()=[{}],audit.getAmount()=[{}]",userAccount.getUserId(), userAccount.getSumAmount(), audit.getAmount());
                     log.info("账户金额少于提现金额,请审核账户。 userId=[{}}], userAccount.getSumAmount()=[{}],audit.getAmount()=[{}]",userAccount.getUserId(), userAccount.getSumAmount(), audit.getAmount());
                     throw new SystemException("账户金额少于提现金额,请审核账户");
                     throw new SystemException("账户金额少于提现金额,请审核账户");