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

namespace SlnMesnac.Repository.service
{
    public interface ProdPlanDetailService : IBaseService<ProdPlanDetail>
    {
        /// <summary>
        /// 获取所有工单信息
        /// </summary>
        /// <returns></returns>
        List<ProdPlanDetail> GetPlanDetails();

        /// <summary>
        /// 验证添加员工打卡记录
        /// </summary>
        /// <param name="planDetails"></param>
        /// <returns></returns>
        bool InsertPlanDetails(List<ProdPlanDetail> planDetails);

        /// <summary>
        /// 根据工单号查询此工单所有明细
        /// </summary>
        /// <param name="orderCode"></param>
        /// <param name="planCode"></param>
        /// <returns></returns>
        List<ProdPlanDetail> GetPlanDetailsByPlanCode(string planCode);

        /// <summary>
        /// 根据计划编号查询最新的一条明细
        /// </summary>
        /// <param name="planCode"></param>
        /// <returns></returns>
        ProdPlanDetail GetLastPlanDetailByPlanCode(string planCode);

        /// <summary>
        /// 根据工单号删除锅数为0的明细
        /// </summary>
        /// <param name="planCode"></param>
        /// <param name="v"></param>
        /// <returns></returns>
        bool DeleteByPlanCodeBatchNumber(string planCode, int number);

        /// <summary>
        /// 产出对应工单里的某个批次
        /// </summary>
        /// <param name="planCode"></param>
        /// <param name="batch"></param>
        bool DeleteTheBatchNumberByPlanCode(string planCode, int batch);
    } 
}
