|
|
|
@ -1,5 +1,6 @@
|
|
|
|
|
package cn.iocoder.yudao.module.bs.dal.mysql.invoice;
|
|
|
|
|
|
|
|
|
|
import cn.hutool.core.collection.CollUtil;
|
|
|
|
|
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
|
|
|
|
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
|
|
|
|
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
|
|
|
@ -19,8 +20,8 @@ import java.util.List;
|
|
|
|
|
public interface InvoiceMapper extends BaseMapperX<InvoiceDO> {
|
|
|
|
|
|
|
|
|
|
default PageResult<InvoiceDO> selectPage(InvoicePageReqVO reqVO) {
|
|
|
|
|
return selectPage(reqVO, new LambdaQueryWrapperX<InvoiceDO>()
|
|
|
|
|
.eqIfPresent(InvoiceDO::getFiles, reqVO.getFiles())
|
|
|
|
|
LambdaQueryWrapperX<InvoiceDO> queryWrapper = new LambdaQueryWrapperX<InvoiceDO>()
|
|
|
|
|
.inIfPresent(InvoiceDO::getId, reqVO.getInIds())
|
|
|
|
|
.betweenIfPresent(InvoiceDO::getCreateTime, reqVO.getCreateTime())
|
|
|
|
|
.eqIfPresent(InvoiceDO::getInvoiceType, reqVO.getInvoiceType())
|
|
|
|
|
.eqIfPresent(InvoiceDO::getInvoiceCode, reqVO.getInvoiceCode())
|
|
|
|
@ -33,7 +34,11 @@ public interface InvoiceMapper extends BaseMapperX<InvoiceDO> {
|
|
|
|
|
.eqIfPresent(InvoiceDO::getDeptId, reqVO.getDeptId())
|
|
|
|
|
.likeIfPresent(InvoiceDO::getDeptName, reqVO.getDeptName())
|
|
|
|
|
.eqIfPresent(InvoiceDO::getRemark, reqVO.getRemark())
|
|
|
|
|
.orderByDesc(InvoiceDO::getId));
|
|
|
|
|
.orderByDesc(InvoiceDO::getId);
|
|
|
|
|
if (CollUtil.isNotEmpty(reqVO.getNotInIds())) {
|
|
|
|
|
queryWrapper.notIn(InvoiceDO::getId, reqVO.getNotInIds());
|
|
|
|
|
}
|
|
|
|
|
return selectPage(reqVO, queryWrapper);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
default List<InvoiceDO> selectList(InvoiceExportReqVO reqVO) {
|
|
|
|
|