| | |
| | | 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; |
| | |
| | | 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)); |
| | | } |
| | | |
| | | } |