using System.Collections.Generic;
using System;
using CncModels.Entity;

namespace CncRepository.Interface
{
    /// <summary>
    /// cnc_production_segment 产量分段记录表 仓储接口
    /// </summary>
    public interface IProductionSegmentRepository
    {
        ProductionSegment GetById(long id);
        ProductionSegment GetActiveSegment(int machineId);
        List<ProductionSegment> GetByMachineAndDate(int machineId, DateTime date);
        int Create(ProductionSegment entity);
        bool CloseSegment(long id, decimal? endPartCount, decimal? quantity, string closeReason, DateTime endTime);
        bool SettleByDate(DateTime date);
        decimal GetTotalByDateRange(DateTime startDate, DateTime endDate, int? workshopId = null);
        int GetActiveMachineCount(DateTime date, int? workshopId = null);
        decimal GetTotalCuttingTimeByDate(DateTime date);
    }
}
