package cn.iocoder.yudao.module.erp.service.finance;
|
|
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
import cn.iocoder.yudao.module.erp.controller.admin.finance.vo.payment.ErpFinancePaymentPageReqVO;
|
import cn.iocoder.yudao.module.erp.controller.admin.finance.vo.payment.ErpFinancePaymentSaveReqVO;
|
import cn.iocoder.yudao.module.erp.dal.dataobject.finance.ErpFinancePaymentDO;
|
import cn.iocoder.yudao.module.erp.dal.dataobject.finance.ErpFinancePaymentItemDO;
|
import jakarta.validation.Valid;
|
|
import java.math.BigDecimal;
|
import java.util.Collection;
|
import java.util.List;
|
import java.util.Map;
|
import java.util.Set;
|
|
/**
|
* ERP 付款单 Service 接口
|
*
|
* @author 超级管理员
|
*/
|
public interface ErpFinancePaymentService {
|
|
/**
|
* 创建付款单
|
*
|
* @param createReqVO 创建信息
|
* @return 编号
|
*/
|
Long createFinancePayment(@Valid ErpFinancePaymentSaveReqVO createReqVO);
|
|
/**
|
* 更新付款单
|
*
|
* @param updateReqVO 更新信息
|
*/
|
void updateFinancePayment(@Valid ErpFinancePaymentSaveReqVO updateReqVO);
|
|
/**
|
* 提交付款单审批
|
*
|
* 仅【未审核】(含审核不通过退回)状态可提交;审批人由「系统管理 - 审批配置」统一指定,
|
* 提交后进入【审批中】,并清空上一轮审核结果。
|
*
|
* @param id 编号
|
*/
|
void submitFinancePayment(Long id);
|
|
/**
|
* 获取付款单的审批人编号集合(或签:任一人审核即可)
|
*
|
* @return 审批人用户编号
|
*/
|
Set<Long> getFinancePaymentApproverUserIds();
|
|
/**
|
* 审核付款单(通过 / 不通过)
|
*
|
* 仅配置内的审批人可执行;审核不通过时必须填写原因,退回后可修改并重新提交。
|
*
|
* @param id 编号
|
* @param pass 是否审核通过
|
* @param reviewRemark 审核意见
|
*/
|
void auditFinancePayment(Long id, Boolean pass, String reviewRemark);
|
|
/**
|
* 删除付款单
|
*
|
* @param ids 编号数组
|
*/
|
void deleteFinancePayment(List<Long> ids);
|
|
/**
|
* 获得付款单
|
*
|
* @param id 编号
|
* @return 付款单
|
*/
|
ErpFinancePaymentDO getFinancePayment(Long id);
|
|
/**
|
* 获得付款单分页
|
*
|
* @param pageReqVO 分页查询
|
* @return 付款单分页
|
*/
|
PageResult<ErpFinancePaymentDO> getFinancePaymentPage(ErpFinancePaymentPageReqVO pageReqVO);
|
|
/**
|
* 统计每张来票已付款金额(未审核 + 审批中 + 已审核,排除作废)
|
*
|
* @param invoiceIds 来票编号列表
|
* @return key 为来票编号,value 为已付款金额
|
*/
|
Map<Long, BigDecimal> getPaymentPriceMapByInvoiceId(Collection<Long> invoiceIds);
|
|
// ==================== 付款单项 ====================
|
|
/**
|
* 获得付款单项列表
|
*
|
* @param paymentId 付款单编号
|
* @return 付款单项列表
|
*/
|
List<ErpFinancePaymentItemDO> getFinancePaymentItemListByPaymentId(Long paymentId);
|
|
/**
|
* 获得付款单项 List
|
*
|
* @param paymentIds 付款单编号数组
|
* @return 付款单项 List
|
*/
|
List<ErpFinancePaymentItemDO> getFinancePaymentItemListByPaymentIds(Collection<Long> paymentIds);
|
|
}
|