using SlnMesnac.Model.domain;
using SlnMesnac.Model.dto;
using SlnMesnac.Repository.service.@base;
using System;
using System.Collections.Generic;
using System.Text;

namespace SlnMesnac.Repository.service
{
    /// <summary>
    /// MES生产计划
    /// </summary>
    public interface IMesProductPlanService : IBaseService<MesProductPlan>
    {
        /// <summary>
        /// 获取MES生产计划
        /// </summary>
        /// <returns></returns>
        List<MesProductPlan> GetMesProductPlans();

        /// <summary>
        /// 根据计划编号获取生产计划
        /// </summary>
        /// <returns></returns>
        MesProductPlan GetProdPlanByPlanCode(string planCode);

        /// <summary>
        /// 获取已开始的第一条生产计划
        /// </summary>
        /// <returns></returns>
        MesProductPlan GetStartedProdPlan(out MesProductPlanDto productPlanDto);
        
        /// <summary>
        /// 获取MES计划详细信息
        /// </summary>
        /// <returns></returns>
        List<MesProductPlanDto> GetPlanDtos();

        /// <summary>
        /// 根据订单编号获取生产计划
        /// </summary>
        /// <param name="orderId"></param>
        /// <returns></returns>
        List<MesProductPlan> GetProdPlansByOrderCode(int orderId);

        /// <summary>
        /// 更新计划信息
        /// </summary>
        /// <param name="prodPlan"></param>
        /// <returns></returns>
        bool UpdateProdPlan(MesProductPlan prodPlan);
    }
}
