package cn.iocoder.yudao.module.erp.service.purchase;
|
|
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
import cn.iocoder.yudao.module.erp.controller.admin.purchase.vo.plan.ErpPurchasePlanPageReqVO;
|
import cn.iocoder.yudao.module.erp.controller.admin.purchase.vo.plan.ErpPurchasePlanSaveReqVO;
|
import cn.iocoder.yudao.module.erp.dal.dataobject.purchase.ErpPurchasePlanDO;
|
import cn.iocoder.yudao.module.erp.dal.dataobject.purchase.ErpPurchasePlanItemDO;
|
|
import java.util.Collection;
|
import java.util.List;
|
import java.util.Map;
|
|
/**
|
* ERP 采购计划 Service 接口
|
*
|
* @author xiaoyi
|
*/
|
public interface ErpPurchasePlanService {
|
|
/**
|
* 创建采购计划
|
*
|
* @param createReqVO 创建信息
|
* @return 编号
|
*/
|
Long createPurchasePlan(ErpPurchasePlanSaveReqVO createReqVO);
|
|
/**
|
* 更新采购计划
|
*
|
* @param updateReqVO 更新信息
|
*/
|
void updatePurchasePlan(ErpPurchasePlanSaveReqVO updateReqVO);
|
|
/**
|
* 删除采购计划
|
*
|
* @param ids 编号数组
|
*/
|
void deletePurchasePlan(Collection<Long> ids);
|
|
/**
|
* 获得采购计划
|
*
|
* @param id 编号
|
* @return 采购计划
|
*/
|
ErpPurchasePlanDO getPurchasePlan(Long id);
|
|
/**
|
* 获得采购计划明细列表
|
*
|
* @param planId 采购计划编号
|
* @return 明细列表
|
*/
|
List<ErpPurchasePlanItemDO> getPurchasePlanItemListByPlanId(Long planId);
|
|
/**
|
* 按采购计划编号集合获得明细列表
|
*
|
* @param planIds 采购计划编号集合
|
* @return 明细列表
|
*/
|
List<ErpPurchasePlanItemDO> getPurchasePlanItemListByPlanIds(Collection<Long> planIds);
|
|
/**
|
* 获得采购计划分页
|
*
|
* @param pageReqVO 分页查询
|
* @return 采购计划分页
|
*/
|
PageResult<ErpPurchasePlanDO> getPurchasePlanPage(ErpPurchasePlanPageReqVO pageReqVO);
|
|
/**
|
* 提交采购计划审批
|
*
|
* @param id 编号
|
* @param processDefinitionKey BPM 流程定义 Key
|
* @param userId 用户编号
|
*/
|
void submitPurchasePlan(Long id, String processDefinitionKey, Long userId);
|
|
/**
|
* 获取采购计划审批流程列表
|
*
|
* @return 流程定义列表
|
*/
|
List<Map<String, Object>> getPurchasePlanApproveProcessDefinitionList();
|
|
/**
|
* BPM 审批结果回调更新采购计划状态
|
*
|
* @param id 采购计划编号
|
* @param bpmResult BPM 审批结果
|
*/
|
void updatePurchasePlanAuditStatus(Long id, Integer bpmResult);
|
|
/**
|
* 根据库存预警自动生成采购计划(草稿)
|
*
|
* <p>遍历启用安全库存的物料,当前库存低于安全库存下限时,
|
* 按缺量生成计划明细。返回草稿计划,由编制人核对后提交审批。
|
*
|
* @param name 计划名称
|
* @param supplierId 供应商编号(可选)
|
* @return 生成的采购计划
|
*/
|
ErpPurchasePlanDO generatePlanFromStockAlert(String name, Long supplierId);
|
|
/**
|
* 审批通过后生成采购申请
|
*
|
* @param id 采购计划编号
|
* @return 生成的采购申请编号列表
|
*/
|
List<Long> generatePurchaseRequests(Long id);
|
|
}
|