package com.ozs.pm.service;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ozs.pm.doman.PmDemand;
import com.ozs.pm.doman.vo.requestVo.PmBookBuildingReqVo;
import com.ozs.pm.doman.vo.requestVo.PmDemandReqVo;
import com.ozs.pm.doman.vo.responseVo.PmDemandResVo;
import com.ozs.pm.doman.vo.responseVo.PmFlowChartResVo;



/**
 * 采购需求Service接口
 * 
 * @author ruoyi
 * @date 2023-01-16
 */
public interface IPmDemandService extends IService<PmDemand>
{
    /**
     * 查询采购需求
     * 
     * @param demandId 采购需求主键
     * @return 采购需求
     */
    public PmDemandResVo selectPmDemandByDemandId(Long demandId,String detailType);

    /**
     * 查询采购需求列表
     * 
     * @param pmDemandReqVo 采购需求
     * @return 采购需求集合
     */
    public IPage<PmDemandResVo> selectPmDemandList(PmDemandReqVo pmDemandReqVo,int reqType);


    /**
     * 新增采购需求
     * 
     * @param pmDemand 采购需求
     * @return 结果
     */
    public int insertPmDemand(PmDemand pmDemand);
    /**
     *修改采购需求
     *
     * @param pmDemand 采购需求
     * @return 结果
     */
    public int updatePmDemand(PmDemand pmDemand);

    /**
     * 需求建档
     * 
     * @param pmBookBuildingReqVo 需求建档
     * @return 结果
     */
    public int bookBuilding(PmBookBuildingReqVo pmBookBuildingReqVo);

    /**
     * 查看流程图
     *
     * @param demandId 采购需求主键
     * @return 采购需求
     */
    public Object viewFlowChart(Long demandId);

    /**
     * 查看流程图
     *
     * @param demandId 采购需求主键
     * @return 采购需求
     */
    public PmFlowChartResVo getModuleInfo(Long demandId, String moduleName);

    /**
     * 提交采购需求
     *
     * @param pmDemandReqVo
     * @return 结果
     */
    public int commit(PmDemandReqVo pmDemandReqVo);

    /**
     * 审核采购需求通过
     *
     * @param pmDemandReqVo
     * @return 结果
     */
    public int reviewTo(PmDemandReqVo pmDemandReqVo);

    /**
     * 审核采购需求退回
     *
     * @param pmDemandReqVo
     * @return 结果
     */
    public int reviewReturn(PmDemandReqVo pmDemandReqVo);

    /**
     * 下达任务
     *
     * @param pmDemandReqVo
     * @return 结果
     */
    public int releaseTask(PmDemandReqVo pmDemandReqVo);
}
