cloudroam
2024-11-08 d21b473a1a9ecae5c6e98e849eaa491ccb4c845b
src/main/java/com/mzl/flower/service/impl/wallet/WalletBillRecordServiceImpl.java
@@ -35,6 +35,7 @@
import javax.servlet.http.HttpServletResponse;
import java.math.BigDecimal;
import java.net.URLEncoder;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.TimeUnit;
@@ -166,10 +167,12 @@
                                walletBillRecordDO2.setChangeAmount(walletBillRecordDO.getActualTransferAmount());
                                walletBillRecordDO2.setBalance(walletDO.getWithdrawableAmount().add(walletBillRecordDO.getActualTransferAmount()));
                                walletBillRecordDO2.create(SecurityUtils.getUserId());
                                walletBillRecordDO.setId(UUIDGenerator.getUUID());
                                walletBillRecordDO.setRemark("微信商户转账失败,余额返还钱包");
                                walletBillRecordDO2.setId(UUIDGenerator.getUUID());
                                walletBillRecordDO2.setRemark("微信商户转账失败,余额返还钱包");
                                walletBillRecordDO2.setApproveBy("sys");
                                walletBillRecordDO2.setApproveTime(LocalDateTime.now());
                                // 保存账单明细
                                walletBillRecordService.save(walletBillRecordDO);
                                walletBillRecordService.save(walletBillRecordDO2);
                                //提现中金额:减少提现中金额
                                walletDO.setWithdrawingAmount(walletDO.getWithdrawingAmount().subtract(walletBillRecordDO.getActualTransferAmount()));
                                //可提现金额:增加可提现金额
@@ -205,7 +208,7 @@
    public void exportSupplierFinanceList(HttpServletResponse response, QueryWalletBillRecordDTO queryWalletBillRecordDTO) {
        List<WalletBillRecordVO> list = walletBillRecordMapper.queryWalletBillRecordList(queryWalletBillRecordDTO);
        String[] rowsName = new String[]{"序号","供应商信息", "变动类型", "原金额", "变动金额", "现余额", "提交时间", "审核时间", "备注"};
        String[] rowsName = new String[]{"序号","供应商信息", "变动类型", "原金额", "变动金额", "现余额", "提交时间", "审核时间", "备注", "操作人"};
        List<Object[]> dataList = new ArrayList<>();
        int sn = 1;
        for (WalletBillRecordVO o : list) {
@@ -215,11 +218,16 @@
            objs[a++] = o.getSupplierName()+":"+o.getSupplierId(); // 供应商信息
            objs[a++] = o.getTypeName(); // 变动类型
            objs[a++] = o.getOriginalAmount(); // 原金额
            objs[a++] = o.getChangeAmount(); // 变动金额
            if (Constants.BILL_CHANGE_METHOD.reduce.name().equals(o.getMethod())) {
                objs[a++] = "-" + o.getChangeAmount(); // 变动金额
            } else {
                objs[a++] = "+" + o.getChangeAmount(); // 变动金额
            }
            objs[a++] = o.getBalance(); //现余额
            objs[a++] = o.getCreateTime();//提交时间
            objs[a++] = o.getApproveTime(); // 审核时间
            objs[a++] = o.getRemark(); //备注
            objs[a++] = o.getApproveName(); //操作人
            dataList.add(objs);
            sn++;
        }