package com.njcn.rdms.module.project.service.product;

import com.njcn.rdms.framework.common.pojo.PageResult;
import com.njcn.rdms.module.project.controller.admin.product.vo.requirement.*;

import java.util.List;

/**
 * 产品需求 Service 接口
 */
public interface ProductRequirementService {

    Long createRequirement(ProductRequirementSaveReqVO createReqVO);

    void updateRequirement(ProductRequirementUpdateReqVO updateReqVO);

    ProductRequirementRespVO getRequirement(Long id, Long productId);

    PageResult<ProductRequirementRespVO> getRequirementPage(ProductRequirementPageReqVO pageReqVO);

    PageResult<ProductRequirementRespVO> getRequirementTree(ProductRequirementPageReqVO pageReqVO);

    ProductRequirementDashboardRespVO getRequirementDashboard(Long productId);

    void changeRequirementStatus(ProductRequirementStatusActionReqVO reqVO);

    void changeRequirementStatusForReview(ProductRequirementStatusActionReqVO reqVO);

    void deleteRequirement(Long id, Long productId);

    Long splitRequirement(ProductRequirementSplitReqVO reqVO);

    void closeRequirement(ProductRequirementCloseReqVO reqVO);

    List<ProductRequirementStatusTransitionRespVO> getAllowedTransitions(Long requirementId, Long productId);

    List<ProductRequirementAllowedTransitionBatchRespVO> getAllowedTransitionsBatch(ProductRequirementBatchReqVO reqVO);

    boolean hasDispatchedProjectRequirement(Long requirementId, Long productId);

    List<ProductRequirementHasDispatchedBatchRespVO> hasDispatchedProjectRequirementBatch(ProductRequirementBatchReqVO reqVO);

    Long createRequirementModule(ProductRequirementModuleReqVO reqVO);

    void updateRequirementModule(ProductRequirementModuleReqVO reqVO);

    void deleteRequirementModule(Long moduleId, Long productId);

    List<ProductRequirementModuleRespVO> getRequirementModuleTree(Long productId);

    List<ProductRequirementStatusDictRespVO> getRequirementStatusDict();

    List<ProductRequirementStatusDictRespVO> getRequirementTerminalStatusDict();

    ProductRequirementDispatchedProjectLinkRespVO getDispatchedProjectLink(Long productRequirementId);

}
