feat:发票和充值申请都可以查看详情

This commit is contained in:
dzc committed 2025-07-09 15:11:24 +08:00
1 parent 878ce352dc
commit 2257a55a3e
5 files changed
+48 -2

No files matched your search

@@ -17,6 +17,8 @@ import com.bsd.pjcloud.wallet.api.dto.recharge.WalletRechargeImportDto;
import com.bsd.pjcloud.wallet.api.dto.recharge.WalletRechargeSaveTopupDto;
import com.bsd.pjcloud.wallet.api.dto.recharge.excel.WalletRechargeExcelDto;
import com.bsd.pjcloud.wallet.api.entity.recharge.WalletRechargeApplyEntity;
import com.bsd.pjcloud.wallet.api.vo.recharge.WalletRechargeApplyCompareAceVo;
import com.bsd.pjcloud.wallet.api.vo.recharge.WalletRechargeImportVo;
import com.bsd.pjcloud.wallet.api.vo.recharge.excel.WalletRechargeByApplyExcelVo;
import com.bsd.pjcloud.wallet.service.WalletRechargeApplyService;
import com.bsd.pjcloud.wallet.service.WalletRechargeApplyComposeService;
@@ -61,10 +63,16 @@ public class WalletRechargeApplyController {
@GetMapping("/compare-page-join")
@Operation(summary = "批量充值/扣款记录")
public R comparePageJoin(@ParameterObject Page page, @ParameterObject WalletRechargeApplyDto dto) {
public R<WalletRechargeApplyCompareAceVo> comparePageJoin(@ParameterObject Page page, @ParameterObject WalletRechargeApplyDto dto) {
return R.ok(walletTransactionComposeService.pageJoin(page, dto));
}
@GetMapping("/compare-invoice-page-join")
@Operation(summary = "批量充值/扣款记录发票查询")
public R<Page<WalletRechargeImportVo>> compareInvoicePageJoin(@ParameterObject Page page, @ParameterObject WalletRechargeApplyDto dto) {
return R.ok(walletTransactionComposeService.compareInvoicePageJoin(page, dto));
}
@Operation(summary = "提交申请", description = "提交申请")
@SysLog("提交申请")
@GetMapping("/apply")
@@ -25,6 +25,7 @@ public interface WalletRechargeImportMapper extends PjcloudBaseMapper<WalletRech
MPJLambdaWrapper<WalletRechargeImportEntity> wrapper = new MPJLambdaWrapper<WalletRechargeImportEntity>()
.eqIfExists(WalletRechargeImportEntity::getId, dto.getId())
.eqIfExists(WalletRechargeImportEntity::getApplyId, dto.getApplyId())
.eqIfExists(WalletRechargeImportEntity::getInvoiceId, dto.getInvoiceId())
.orderByDesc(WalletRechargeImportEntity::getCreateTime)
.orderByDesc(WalletRechargeImportEntity::getUserId);
return selectJoinPage(page, WalletRechargeImportVo.class, wrapper);
@@ -4,8 +4,14 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.bsd.pjcloud.wallet.api.dto.recharge.WalletRechargeApplyDto;
import com.bsd.pjcloud.wallet.api.dto.recharge.WalletRechargeSaveTopupDto;
import com.bsd.pjcloud.wallet.api.vo.recharge.WalletRechargeApplyCompareAceVo;
import com.bsd.pjcloud.wallet.api.vo.recharge.WalletRechargeImportVo;
public interface WalletRechargeApplyComposeService {
WalletRechargeApplyCompareAceVo pageJoin(Page page, WalletRechargeApplyDto dto);
/**
* 批量充值/扣款记录发票查询
*/
Page<WalletRechargeImportVo> compareInvoicePageJoin(Page page, WalletRechargeApplyDto dto);
}
@@ -3,6 +3,7 @@ package com.bsd.pjcloud.wallet.service.impl.recharge;
import cn.hutool.core.date.DatePattern;
import cn.hutool.core.date.LocalDateTimeUtil;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.bsd.pjcloud.common.core.util.BeanUtils;
@@ -164,6 +165,37 @@ public class WalletRechargeApplyComposeServiceImpl implements WalletRechargeAppl
}
@Override
public Page<WalletRechargeImportVo> compareInvoicePageJoin(Page page, WalletRechargeApplyDto dto) {
WalletRechargeImportDto importDto = new WalletRechargeImportDto();
WalletRechargeApplyEntity applyEntity = null;
if (ObjectUtil.isNotEmpty(dto.getInvoiceId())) {
importDto.setInvoiceId(dto.getInvoiceId());
} else if (ObjectUtil.isNotEmpty(dto.getId())) {
importDto.setApplyId(dto.getId());
applyEntity = rechargeApplyService.getById(dto.getId());
} else {
return null;
}
Page<WalletRechargeImportVo> list = rechargeImportService.pageJoin(page, importDto);
if (ObjectUtil.isNotEmpty(list.getRecords())) {
for (WalletRechargeImportVo v : list.getRecords()) {
if (ObjectUtil.isNotEmpty(dto.getInvoiceId())) {
v.setBizType(WalletBizRechargeEnum.ADD.getCode());
} else if (ObjectUtil.isNotEmpty(dto.getId())) {
if (ObjectUtil.isNotEmpty(applyEntity)) {
v.setBizType(dto.getBizType());
}
}
}
}
return list;
}
private void getItem(WalletRechargeImportVo user,
List<WalletRechargeApplySelectCompareVo> monthList,
List<WalletRechargeApplySelectCompareVo> prenMonthList,
@@ -103,7 +103,6 @@ public class WalletRechargeInvoiceServiceImpl extends ServiceImpl<WalletRecharge
.set(WalletRechargeInvoiceEntity::getProcessStatus, null)
.set(WalletRechargeInvoiceEntity::getProcessTime, null)
.set(WalletRechargeInvoiceEntity::getStampPicUrl, null)
.set(WalletRechargeInvoiceEntity::getStatus, WalletRechargeInvoiceStatusEnum.FINANCE_CANCELLATION.getCode())
.eq(WalletRechargeInvoiceEntity::getId, id)
);
}