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;
|
|
/**
|
* ERP 付款单 Service 接口
|
*
|
* @author 超级管理员
|
*/
|
public interface ErpFinancePaymentService {
|
|
/**
|
* 创建付款单
|
*
|
* @param createReqVO 创建信息
|
* @return 编号
|
*/
|
Long createFinancePayment(@Valid ErpFinancePaymentSaveReqVO createReqVO);
|
|
/**
|
* 更新付款单
|
*
|
* @param updateReqVO 更新信息
|
*/
|
void updateFinancePayment(@Valid ErpFinancePaymentSaveReqVO updateReqVO);
|
|
/**
|
* 提交付款单审批
|
*
|
* @param id 编号
|
* @param processDefinitionKey 流程定义的编号
|
* @param userId 用户编号
|
*/
|
void submitFinancePayment(Long id, String processDefinitionKey, Long userId);
|
|
/**
|
* 获得付款单审批流程定义列表
|
*
|
* @return 流程定义列表
|
*/
|
List<Map<String, Object>> getFinancePaymentApproveProcessDefinitionList();
|
|
/**
|
* 更新付款单的审批状态(由 BPM 流程实例的回调触发)
|
*
|
* @param id 编号
|
* @param bpmResult BPM 审批结果
|
*/
|
void updateFinancePaymentAuditStatus(Long id, Integer bpmResult);
|
|
/**
|
* 删除付款单
|
*
|
* @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);
|
|
}
|