| | |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDateTime; |
| | | import java.util.Collection; |
| | | import java.util.Collections; |
| | | import java.util.List; |
| | |
| | | .eqIfPresent(ErpFinancePaymentDO::getSupplierId, reqVO.getSupplierId()) |
| | | .eqIfPresent(ErpFinancePaymentDO::getCreator, reqVO.getCreator()) |
| | | .eqIfPresent(ErpFinancePaymentDO::getFinanceUserId, reqVO.getFinanceUserId()) |
| | | .eqIfPresent(ErpFinancePaymentDO::getAccountId, reqVO.getAccountId()) |
| | | .likeIfPresent(ErpFinancePaymentDO::getAccountName, reqVO.getAccountName()) |
| | | .eqIfPresent(ErpFinancePaymentDO::getStatus, reqVO.getStatus()) |
| | | .likeIfPresent(ErpFinancePaymentDO::getRemark, reqVO.getRemark()) |
| | | .orderByDesc(ErpFinancePaymentDO::getId); |
| | |
| | | return convertMap(result, obj -> (Long) obj.get("invoice_id"), obj -> (BigDecimal) obj.get("total_payment_price")); |
| | | } |
| | | |
| | | /** |
| | | * 按供应商与付款时间范围查询付款单(供应商往来) |
| | | */ |
| | | default List<ErpFinancePaymentDO> selectListBySupplierIdAndPaymentTimeBetween(Long supplierId, |
| | | LocalDateTime beginTime, |
| | | LocalDateTime endTime, |
| | | Collection<Integer> statuses) { |
| | | return selectList(new LambdaQueryWrapperX<ErpFinancePaymentDO>() |
| | | .eq(ErpFinancePaymentDO::getSupplierId, supplierId) |
| | | .geIfPresent(ErpFinancePaymentDO::getPaymentTime, beginTime) |
| | | .leIfPresent(ErpFinancePaymentDO::getPaymentTime, endTime) |
| | | .inIfPresent(ErpFinancePaymentDO::getStatus, statuses) |
| | | .orderByAsc(ErpFinancePaymentDO::getPaymentTime) |
| | | .orderByAsc(ErpFinancePaymentDO::getId)); |
| | | } |
| | | |
| | | } |