|
@@ -10,7 +10,10 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
import com.fjhx.account.entity.account.dto.AccountPaymentDto;
|
|
import com.fjhx.account.entity.account.dto.AccountPaymentDto;
|
|
import com.fjhx.account.entity.account.dto.AccountRequestFundsSelectDto;
|
|
import com.fjhx.account.entity.account.dto.AccountRequestFundsSelectDto;
|
|
import com.fjhx.account.entity.account.enums.PaymentStatusEnum;
|
|
import com.fjhx.account.entity.account.enums.PaymentStatusEnum;
|
|
-import com.fjhx.account.entity.account.po.*;
|
|
|
|
|
|
+import com.fjhx.account.entity.account.po.AccountManagement;
|
|
|
|
+import com.fjhx.account.entity.account.po.AccountPayment;
|
|
|
|
+import com.fjhx.account.entity.account.po.AccountPaymentRecords;
|
|
|
|
+import com.fjhx.account.entity.account.po.AccountRunningWater;
|
|
import com.fjhx.account.entity.account.vo.AccountPaymentRecordsVo;
|
|
import com.fjhx.account.entity.account.vo.AccountPaymentRecordsVo;
|
|
import com.fjhx.account.entity.account.vo.AccountPaymentVo;
|
|
import com.fjhx.account.entity.account.vo.AccountPaymentVo;
|
|
import com.fjhx.account.mapper.account.AccountPaymentMapper;
|
|
import com.fjhx.account.mapper.account.AccountPaymentMapper;
|
|
@@ -174,19 +177,19 @@ public class AccountPaymentServiceImpl extends ServiceImpl<AccountPaymentMapper,
|
|
Long companyId = SecurityUtils.getCompanyId();
|
|
Long companyId = SecurityUtils.getCompanyId();
|
|
accountPaymentDto.setCompanyId(companyId);
|
|
accountPaymentDto.setCompanyId(companyId);
|
|
|
|
|
|
- AccountRemainder accountRemainder = accountRemainderService.getOne(Wrappers.<AccountRemainder>lambdaQuery()
|
|
|
|
- .eq(AccountRemainder::getAccountManagementId, accountPaymentDto.getAccountManagementId())
|
|
|
|
- .eq(AccountRemainder::getCurrency, accountPaymentDto.getCurrency()));
|
|
|
|
-
|
|
|
|
- // 如果不存在这条数据则返回账户余额不足
|
|
|
|
- if (ObjectUtil.isEmpty(accountRemainder)) {
|
|
|
|
- throw new ServiceException("该账户不存在此币种,请前往资金账户添加");
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- // 如果余额小于付款金额则返回账户余额不足
|
|
|
|
- if (accountRemainder.getRemainder().compareTo(accountPaymentDto.getAmount()) < 0) {
|
|
|
|
- throw new ServiceException("账户余额不足");
|
|
|
|
- }
|
|
|
|
|
|
+// AccountRemainder accountRemainder = accountRemainderService.getOne(Wrappers.<AccountRemainder>lambdaQuery()
|
|
|
|
+// .eq(AccountRemainder::getAccountManagementId, accountPaymentDto.getAccountManagementId())
|
|
|
|
+// .eq(AccountRemainder::getCurrency, accountPaymentDto.getCurrency()));
|
|
|
|
+//
|
|
|
|
+// // 如果不存在这条数据则返回账户余额不足
|
|
|
|
+// if (ObjectUtil.isEmpty(accountRemainder)) {
|
|
|
|
+// throw new ServiceException("该账户不存在此币种,请前往资金账户添加");
|
|
|
|
+// }
|
|
|
|
+//
|
|
|
|
+// // 如果余额小于付款金额则返回账户余额不足
|
|
|
|
+// if (accountRemainder.getRemainder().compareTo(accountPaymentDto.getAmount()) < 0) {
|
|
|
|
+// throw new ServiceException("账户余额不足");
|
|
|
|
+// }
|
|
|
|
|
|
//刷新打款信息
|
|
//刷新打款信息
|
|
AccountPayment oldAccountPayment = this.getById(accountPaymentDto.getId());
|
|
AccountPayment oldAccountPayment = this.getById(accountPaymentDto.getId());
|
|
@@ -222,13 +225,13 @@ public class AccountPaymentServiceImpl extends ServiceImpl<AccountPaymentMapper,
|
|
accountPaymentRecords.setCompanyId(companyId);
|
|
accountPaymentRecords.setCompanyId(companyId);
|
|
accountPaymentRecordsService.save(accountPaymentRecords);
|
|
accountPaymentRecordsService.save(accountPaymentRecords);
|
|
|
|
|
|
- // 赋值变更金额
|
|
|
|
- accountRemainder.setChangeRemainder(accountPaymentDto.getAmount());
|
|
|
|
- // 修改账户-余额表的中余额
|
|
|
|
- accountRemainder.setRemainder(accountRemainder.getRemainder().subtract(accountPaymentDto.getAmount()));
|
|
|
|
- // 打款的交易状态都是支出
|
|
|
|
- accountRemainder.setStatus("20");
|
|
|
|
- accountRemainderService.updateById(accountRemainder);
|
|
|
|
|
|
+// // 赋值变更金额
|
|
|
|
+// accountRemainder.setChangeRemainder(accountPaymentDto.getAmount());
|
|
|
|
+// // 修改账户-余额表的中余额
|
|
|
|
+// accountRemainder.setRemainder(accountRemainder.getRemainder().subtract(accountPaymentDto.getAmount()));
|
|
|
|
+// // 打款的交易状态都是支出
|
|
|
|
+// accountRemainder.setStatus("20");
|
|
|
|
+// accountRemainderService.updateById(accountRemainder);
|
|
|
|
|
|
// 添加附件信息
|
|
// 添加附件信息
|
|
ObsFileUtil.saveFile(accountPaymentDto.getFileList(), accountPaymentRecords.getId());
|
|
ObsFileUtil.saveFile(accountPaymentDto.getFileList(), accountPaymentRecords.getId());
|