| | |
| | | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| | | import cn.iocoder.yudao.module.erp.controller.admin.purchase.vo.request.ErpPurchaseRequestPageReqVO; |
| | | import cn.iocoder.yudao.module.erp.controller.admin.purchase.vo.request.ErpPurchaseRequestSaveReqVO; |
| | | import cn.iocoder.yudao.module.erp.controller.admin.purchase.vo.request.ErpPurchaseRequestImportExcelVO; |
| | | import cn.iocoder.yudao.module.erp.controller.admin.purchase.vo.request.ErpPurchaseRequestImportRespVO; |
| | | import cn.iocoder.yudao.module.erp.dal.dataobject.purchase.ErpPurchaseRequestDO; |
| | | import cn.iocoder.yudao.module.erp.dal.dataobject.purchase.ErpPurchaseRequestItemDO; |
| | | import jakarta.validation.Valid; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * ERP 采购申请 Service 接口 |
| | | * |
| | | * @author 芋道源码 |
| | | */ |
| | | public interface ErpPurchaseRequestService { |
| | | |
| | |
| | | * 创建采购申请 |
| | | * |
| | | * @param createReqVO 创建信息 |
| | | * @param userId 用户编号(申请人) |
| | | * @param deptId 部门编号(申请部门) |
| | | * @return 编号 |
| | | */ |
| | | Long createPurchaseRequest(@Valid ErpPurchaseRequestSaveReqVO createReqVO, Long userId, Long deptId); |
| | | Long createPurchaseRequest(@Valid ErpPurchaseRequestSaveReqVO createReqVO); |
| | | |
| | | /** |
| | | * 导入采购申请 |
| | | * |
| | | * @param importList 导入数据(每一行 = 一条明细,相同采购申请单号合并为一张申请) |
| | | * @return 导入结果 |
| | | */ |
| | | ErpPurchaseRequestImportRespVO importPurchaseRequestList(List<ErpPurchaseRequestImportExcelVO> importList); |
| | | |
| | | /** |
| | | * 更新采购申请 |
| | |
| | | PageResult<ErpPurchaseRequestDO> getPurchaseRequestPage(ErpPurchaseRequestPageReqVO pageReqVO); |
| | | |
| | | /** |
| | | * 获得采购申请明细列表 |
| | | * 获得采购申请项列表 |
| | | * |
| | | * @param requestId 采购申请编号 |
| | | * @return 采购申请明细列表 |
| | | * @return 采购申请项列表 |
| | | */ |
| | | List<ErpPurchaseRequestItemDO> getPurchaseRequestItemListByRequestId(Long requestId); |
| | | |
| | | /** |
| | | * 获得采购申请明细列表 |
| | | * 获得采购申请项 List |
| | | * |
| | | * @param requestIds 采购申请编号数组 |
| | | * @return 采购申请明细列表 |
| | | * @return 采购申请项 List |
| | | */ |
| | | List<ErpPurchaseRequestItemDO> getPurchaseRequestItemListByRequestIds(Collection<Long> requestIds); |
| | | |
| | | /** |
| | | * 提交采购申请审批 |
| | | * |
| | | * @param id 编号 |
| | | * @param processDefinitionKey 流程定义 Key(用户选择) |
| | | * @param userId 用户编号 |
| | | * @param id 编号 |
| | | * @param processDefinitionKey 流程定义 Key |
| | | * @param userId 用户编号 |
| | | */ |
| | | void submitPurchaseRequest(Long id, String processDefinitionKey, Long userId); |
| | | |
| | | /** |
| | | * 更新采购申请审批状态 |
| | | * |
| | | * @param id 编号 |
| | | * @param bpmResult BPM 审批结果 |
| | | */ |
| | | void updatePurchaseRequestAuditStatus(Long id, Integer bpmResult); |
| | | |
| | | /** |
| | | * 根据采购申请生成采购订单 |
| | | * |
| | | * @param id 采购申请编号 |
| | | * @param supplierId 供应商编号 |
| | | * @param userId 用户编号 |
| | | * @return 采购订单编号 |
| | | */ |
| | | Long generatePurchaseOrder(Long id, Long supplierId, Long userId); |
| | | |
| | | /** |
| | | * 获取采购申请审批流程列表 |
| | | * |
| | | * @return 流程定义列表 |
| | | */ |
| | | List<java.util.Map<String, Object>> getPurchaseRequestApproveProcessDefinitionList(); |
| | | List<Map<String, Object>> getPurchaseRequestApproveProcessDefinitionList(); |
| | | |
| | | } |
| | | /** |
| | | * 更新采购申请审批结果(BPM 回调) |
| | | * |
| | | * @param id 编号 |
| | | * @param bpmResult BPM 审批结果 |
| | | */ |
| | | void updatePurchaseRequestAuditStatus(Long id, Integer bpmResult); |
| | | |
| | | /** |
| | | * 生成采购订单 |
| | | * |
| | | * @param id 采购申请编号 |
| | | * @param supplierId 供应商编号 |
| | | * @return 采购订单编号 |
| | | */ |
| | | Long generatePurchaseOrder(Long id, Long supplierId); |
| | | |
| | | /** |
| | | * 重置采购申请状态(驳回 → 草稿) |
| | | * |
| | | * @param id 编号 |
| | | */ |
| | | void resetPurchaseRequestStatus(Long id); |
| | | |
| | | /** |
| | | * 根据编号列表获取采购申请列表 |
| | | * |
| | | * @param ids 编号列表 |
| | | * @return 采购申请列表 |
| | | */ |
| | | List<ErpPurchaseRequestDO> getPurchaseRequestList(List<Long> ids); |
| | | |
| | | } |